Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2004 Wayne Wolf Overheads for Computers as Components Operating systems zWindows CE files. zWindows CE databases. zWindows CE processes.

Similar presentations


Presentation on theme: "© 2004 Wayne Wolf Overheads for Computers as Components Operating systems zWindows CE files. zWindows CE databases. zWindows CE processes."— Presentation transcript:

1 © 2004 Wayne Wolf Overheads for Computers as Components Operating systems zWindows CE files. zWindows CE databases. zWindows CE processes.

2 © 2004 Wayne Wolf Overheads for Computers as Components WinCE file system zDesigned for devices without rotating storage. yMay use disk drives. zBased upon object store. yObject store is undocumented---can’t determine format in memory. zAPI is fairly complete version of Win32 file system.

3 © 2004 Wayne Wolf Overheads for Computers as Components Object store zDefault file system in WinCE. zStores files in compressed form. zApplications cannot easily distinguish between RAM and ROM files. zLimited to 256 MB of RAM. zIndividual file limited to 32 MB.

4 © 2004 Wayne Wolf Overheads for Computers as Components Other WinCE file systems zInstallable file system (IFS): up to 256 storage devices with file systems. zEvery storage device is a directory from root. yDoesn’t use drive letters C: etc. zDoesn’t have size limitations of object store. zUses Windows-style file names. zSupports many attribute flags: read-only, system, hidden, etc.

5 © 2004 Wayne Wolf Overheads for Computers as Components Memory-mapped files zCan use memory reads/writes to read and write file. yDon’t need FileRead(), FileWrite(). zOpened with specialized calls CreateFileForMapping(), CreateFileMapping().

6 © 2004 Wayne Wolf Overheads for Computers as Components WinCE registry zDatabase that stores data on configuration of WinCE and applications. yUsed to store data that needs to be saved. zContains keys, values. yMultiple levels of keys separated by ‘\’. zRegistry access: yKey containing value is opened. yValue read or written. yKey is closed.

7 © 2004 Wayne Wolf Overheads for Computers as Components WinCE databases zDesigned for address lists, etc. zProvides basic database functions: yOne level. yAt most four sort indexes. zNot supported by other Windows platforms.

8 © 2004 Wayne Wolf Overheads for Computers as Components Database records zDatabase: set of records. zRecord: unlimited number of properties. zProperty types: y2-byte signed integer. y2-byte unsigned integer. y4-byte signed integer. y4-byte unsigned integer. yTime/date structure. yNull-terminated Unicode string. yCollection of bytes. yBoolean. y8-byte signed value.

9 © 2004 Wayne Wolf Overheads for Computers as Components Database volumes zVolume: format for storing database in a file. zCan be stored in compact flash, etc. zMust be mounted and dismounted.

10 © 2004 Wayne Wolf Overheads for Computers as Components Windows CE modules and processes zTypes of executable code: yApplications.exe. yDynamically linked libraries.dll. zA process is an instance of an application. yEach process has its own thread.

11 © 2004 Wayne Wolf Overheads for Computers as Components DLLs vs EXEs zAn executable can be executed. zA DLL cannot be directly executed. yMust be called by an EXE or DLL. yEXE can list the DLL in its import table. yDLL can be loaded explicitly. zShare file format. yOnly difference is markers in the header.

12 © 2004 Wayne Wolf Overheads for Computers as Components WinCE processes zOnly 32 processes can execute at any one time. zWinCE processes contain less state than other Windows processes. yNo current directory, etc.

13 © 2004 Wayne Wolf Overheads for Computers as Components WinCE startup zWhen started, WinCE starts four processes: yKernel NK.exe. ySystem services FileSys.exe. yGUI support GWES.exe. yDevice drivers Device.exe.

14 © 2004 Wayne Wolf Overheads for Computers as Components WinCE threads zA thread is a flow of control. yHas its own stack and register set. zA process has one or more threads. yPrimary process for threads. yProcess can create an arbitrary number of additional threads. zAll threads in a process share the same address space.

15 © 2004 Wayne Wolf Overheads for Computers as Components Threads and scheduling zThe kernel schedules threads. yPreemptive scheduling. yTime sliced into quanta. zPreemptive scheduling: yHigher priority ready thread runs first. yThread can be blocked. yScheduler supports priority inheritance to solve priority inversion. z256 possible scheduling priorities.

16 © 2004 Wayne Wolf Overheads for Computers as Components Priorities and quanta zPriority can be changed by the thread or by another thread. y0 is highest priority, 255 is lowest. zEach thread may have its own time quantum.

17 © 2004 Wayne Wolf Overheads for Computers as Components WinCE fibers zFiber: thread-like object that is scheduled by the application, not the system. yApplication creates thread, then turns it into a fiber. zIntroduced for better compatibility with Unix.

18 © 2004 Wayne Wolf Overheads for Computers as Components Thread local storage zEach thread that calls a routine can have its own local storage. yPersistent. yUnique to a thread.

19 © 2004 Wayne Wolf Overheads for Computers as Components WinCE synchronization zBased on synchronization objects. yThread waits on synchronization object. ySignal to objectd causes thread to unblock.

20 © 2004 Wayne Wolf Overheads for Computers as Components WinCE events zEvent object capture signals: yNamed objects. yIn signaled or nonsignaled state. zEvent object must be created in each process that wants to use it. zProcesses can wait on objects.

21 © 2004 Wayne Wolf Overheads for Computers as Components Semaphore objects zCounting semaphores. yZero count is not signaled. yNon-zero count is signaled. zThreads can wait on semaphore objects.

22 © 2004 Wayne Wolf Overheads for Computers as Components Mutexes zUsed to make sure that only one process at a time works on a resource. ySignal is on when not owned by a thread. ySignal is off when owned by a thread.

23 © 2004 Wayne Wolf Overheads for Computers as Components Critical sections zCritical section of code must not be executed at same time as another critical section. zControlled by EnterCriticalSection(), LeaveCriticalSection().


Download ppt "© 2004 Wayne Wolf Overheads for Computers as Components Operating systems zWindows CE files. zWindows CE databases. zWindows CE processes."

Similar presentations


Ads by Google