36
© Oxford University Press 2007. All rights reserved. 1 Mobile Operating Systems Lesson 06 Windows CEPart 2

Mobile Operating Systems - Devi Ahilya … Operating Systems Lesson 06 Windows CE Part 2 © Oxford University Press 2007. All rights reserved. 2 Application layer above the OS,

Embed Size (px)

Citation preview

© Oxford University Press 2007. All rights reserved. 1

Mobile Operating Systems

Lesson 06Windows CE─ Part 2

© Oxford University Press 2007. All rights reserved. 2

Application layer above the OS, hardware abstraction and hardware

© Oxford University Press 2007. All rights reserved. 3

OS layer above the hardware abstraction and hardware

© Oxford University Press 2007. All rights reserved. 4

Windows CE Memory Management

• Assumes 4 GB virtual memory• RAM, ROM, and flash memories• A memory has logical hexadecimal

addresses from 000000000h to FFFFFFFFh

© Oxford University Press 2007. All rights reserved. 5

Windows CE Memory Management

• A ROM image─ the footprint of OS, data, and the applications at the permanently installed ROM (or flash memory)

• An OS configured and customized for an embedded application(s)─ footprint is the ROM image

• The customization reduces the OS footprint

© Oxford University Press 2007. All rights reserved. 6

Windows CE Memory Management

• Windows CE needs a minimum footprint of 350 kB

• Device applications optimized so that the devices need minimal storage below 1 MB with no disk storage

• Windows CE footprint burned in ROM and configured as it does not allow end-user extension

© Oxford University Press 2007. All rights reserved. 7

Windows CE Memory manager functions

© Oxford University Press 2007. All rights reserved. 8

Windows CE memory partitioning

© Oxford University Press 2007. All rights reserved. 9

Memory manager

• Assigns contagious pages in virtual address space to one of the 32 memory slots

• Each slot of 32 MB• Allocates a distinct slot to a distinct

process among the maximum 32 concurrently running processes

© Oxford University Press 2007. All rights reserved. 10

Memory manager

• Allocation of memory slots reduces fragmentation of pages to a significant extent as pages of processes are at the contagious addresses in the slot

• Fragmentation occurs only when the memory needed by the process code and data is more than 32 MB

© Oxford University Press 2007. All rights reserved. 11

Dynamic heap in the program memory

• Of application process stacks, TCP/IP stack, OS functions stack, applications and OS functions dynamic-memory spaces, system and application global variables, Bluetooth stack, and WiFistack

© Oxford University Press 2007. All rights reserved. 12

Windows CE memory manager four different types of access mechanisms

• Simple─ There is no use of paging or cache.

• Cache─ Cache is used but paging is not used. Processor cache is used along with the RAM/ROM/flash memory.

• Page─ Paging is used but not cache.• Sophisticated─ both cache and paging

are employed

© Oxford University Press 2007. All rights reserved. 13

Execution in place (XIP) storage memory addresses

• Windows CE 3.x and 4.x (not 5.x) provides XIP

• Static allocation of memory addresses for the application-installed programs and data storage

© Oxford University Press 2007. All rights reserved. 14

XIP storage memory addresses

• Built-in applications in storage memory and not loaded in RAM before execution

• Process runs these from XIP directly from process codes and data in ROM or flash)

© Oxford University Press 2007. All rights reserved. 15

ROM and RAM

• OS and system functions in ROM• An automotive PC with Windows CE 8

MB ROM and RAM each• The PocketPC 2–8 MB ROM and 8–32

MB RAM in storage memory

© Oxford University Press 2007. All rights reserved. 16

File manager

• Manages data as a database or object file

• A file system─ a root directory with which the file folders associate in a tree-like structure

• Division of all file folders into volumes• A volume ─ unit which can be loaded

from the device to the computer or can be stored on the device from the computer

© Oxford University Press 2007. All rights reserved. 17

File Volume

• Each volume has a root directory which has directories and file folders

• Each directory can have further divisions into subdirectories and file folders

• Each subdirectory can have further divisions into files and subdirectories till the leaf node which has a single file folder

© Oxford University Press 2007. All rights reserved. 18

Communication, Network, Device, and Peripheral Drivers

• Communication and network APIs for serial, IrDA, TCP/IP, Bluetooth stack, and WiFi stack

• IP-based connectivity to the network and WiFi-based connectivity in later versions

• Window CE integrates Microsoft Smart phone software

• Enables the application of Windows CE device as cellular GSM/CDMA phone

© Oxford University Press 2007. All rights reserved. 19

Serial communication

• Uses a cradle• A serial manager (SM) provides interface to

the device on cradle with the RS232C COM port of the PC

• Connection management (CM) by using the serial link interface protocol (SLIP) and point-to-point (PPP) protocol

• IrDA asynchronous serial (115 kbps) or synchronous serial communication (1.152 or 4 Mbps) uses ActiveSync

© Oxford University Press 2007. All rights reserved. 20

Network connectivity

• By radio transceiver and LAN adapter• A NDIS (network driver interface

specification) used for the drivers other than the driver loaded at the hardware

© Oxford University Press 2007. All rights reserved. 21

Windows CE TCP/IP network library functions (for UDP and TCP)

• To transmit or receive the stacks and application [HTTP, HTTPS, FTP, or RAS (remote access service)] requests and response on or from the network

© Oxford University Press 2007. All rights reserved. 22

Windows CE device drivers

• Device driver and peripheral driver functions for low-level drivers at the kernel

© Oxford University Press 2007. All rights reserved. 23

Windows CE

• USB connectivity provided for the peripherals

© Oxford University Press 2007. All rights reserved. 24

Windows CE CSP (cryptographic service providers) server

• For actual implementation of the encryption and security

• Deploys CAPI (cryptographic application programming interface)

© Oxford University Press 2007. All rights reserved. 25

Windows CE thread

• A fundamental unit of execution and providing access of CPU

• Applications developed by coding for the threads

• Supports 256 priority levels for assignment to the threads

• Provides protection from priority inversion as it provides for prioirty inheritence mechanism

© Oxford University Press 2007. All rights reserved. 26

Event

• Sends interrupt signal which is checked for source, that is, whether the source is a hardware event, software exception, user-action-based event, or kernel event (e.g., a kernel command, WM_HIBERNATE)

© Oxford University Press 2007. All rights reserved. 27

Event handler

• Separate for For each event• Asynchronous events• Event handler calls interrupt service thread

(IST) in Windows CE device

© Oxford University Press 2007. All rights reserved. 28

Application as event-driven number of ISTs (i, j, …) and application threads (p, q, …)

© Oxford University Press 2007. All rights reserved. 29

External interrupt

• Notified to the OS and for each request, there is an ISR assigned by the OS on notice

• ISR is a short kernel code which identifies the IST for service and thus activates the IST corresponding to the request (event)

© Oxford University Press 2007. All rights reserved. 30

External interrupt

• Using the concept of ISR, thread priority, and ISTs, Windows CE provides the OS for a hard real-time system with multiple processes

© Oxford University Press 2007. All rights reserved. 31

IST

• Can have one of the eight priority levels• Highest priority level means time critical

priority (to run in hard real-time mode when latency is least and thread execution critical)

• Lowest priority level means idle priority (to run when system is idle)

© Oxford University Press 2007. All rights reserved. 32

IST

• If priorities are same, each thread is allotted a time slot

• Initiated ISTs form a priority-ordered queue of routines and are executed as per priorities

© Oxford University Press 2007. All rights reserved. 33

Application Development tools

• Visual basic and Visual C++• PlatformBuilder─ for developing a

Windows CE application by carrying out OS image creation and integration

• PlatformBuilder provides an integrated environment for customized operating system designs based on Windows CE

© Oxford University Press 2007. All rights reserved. 34

Summary

• Windows CE • Memory manager and memory partitioning• File manager• Event handlers• ISTs• Communication and network APIs for serial,

IrDA, TCP/IP, Bluetooth stack, and WiFi stack

© Oxford University Press 2007. All rights reserved. 35

… Summary

• IP-based connectivity to the network and WiFi-based connectivity

• Integrate phone software• Visual basic and Visual C++• PlatformBuilder

© Oxford University Press 2007. All rights reserved. 36

End of Lesson 06Windows CE─ Part 2