1 / 16

Windows CE Overview and Scheduling

Windows CE Overview and Scheduling. Presented by Dai Kawano. Topic. Overview of Windows CE Windows CE in General Windows CE Architecture Scheduling Processes and Threads Thread Scheduling Synchronization. Overview of Windows CE.

price-grant
Download Presentation

Windows CE Overview and Scheduling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Windows CEOverview and Scheduling Presented by Dai Kawano

  2. Topic • Overview of Windows CE • Windows CE in General • Windows CE Architecture • Scheduling • Processes and Threads • Thread Scheduling • Synchronization

  3. Overview of Windows CE • Uses distinctively different kernel from desktop verison of Windows • 32-bit operating system optimized for devices that have minimal storage • industrial controllers, communications hubs • cameras, telephones, hand-held computers • Supported on Intel x86 (and compatibles), MIPS, ARM, and Hitachi SuperH microprocessors • History • Version 1.0 - Introduced in Nov/1996 • Version 5.0 - Latest stable version releaed in May/2005 • Version 6.0 - Scheduled to be released on Nov/2006

  4. Windows CE Architecture • Kernel • create, terminate, and synchronize processes and threads • schedule, suspend a thread • assign priority to a thread • support interrupt • manage memory

  5. Scheduling • The kernel maintains a priority list of each thread in the operating system • The scheduler • Controls the order in which these threads are sequenced • Allows threads to interact with each other in a predictable fashion • Considers interrupts and reprioritizes the threads accordingly

  6. Processes and Threads • All applications consists of • 1 process • 1 or more threads • Process • Single instance of a running application • Win CE supports 32 processes running simultaneously • Thread • Independent portion of a process and is the basic unit that the operating system allocates processor time to • Execute any part of the process code • 256 priority levels

  7. Thread Scheduling • Windows CE uses a priority-based time-slice algorithm to schedule the execution of threads • Higher priority runs first • Same priority runs in a round-robin fashion • Lower priority run only when all threads with a higher priority are not ready to run

  8. Thread Scheduling (continued) • Threads run for a specific amount of time called a quantum • Default is 100ms but OEM’s can specify a different value • Per quantum a thread is suspended and another thread is scheduled to run • Thread priorities are typically fixed and do not change • One exception – Priority Inheritance • Thread can be suspended anytime

  9. Synchronization • Synchronization Objects • Critical Section • Mutex • Event Notification • Semaphore • Interlocked Functions • Point-to-Point Message Queue

  10. Synchronization – Critical Sections • Enter critical section • EnterCriticalSection • TryEnterCriticalSection • Leave critical section • LeaveCriticalSection

  11. Synchronization – Mutex • Mutex - Synchronization object whose state is set to signaled when it is not owned by a thread and nonsignaled when it is • CreateMutex - Create a mutex • Wait functions - Waiting to own mutex • WaitForSingleObject • WaitForMultipleObjects • MsgWaitForMultipleObjects • ReleaseMutex – Release the mutex

  12. Synchronization – Event Notifications • Windows CE uses event objects to: • Notify a thread when to perform its task • Indicate that an event has occurred • CreateEvent – Creates an event • PulseEvent - Signals and reset the event • SetEvent - Signals the event • ResetEvent - Resets the event

  13. Synchronization – Semaphores • Semaphore - Interprocess synchronization object that limits the number of threads using a resource. • CreateSemaphore - Creates a semaphore • Wait functions to request for a semaphore • ReleaseSemaphore - Releases a semaphore

  14. Synchronization – Interlock Functions • Synchronize access to a variable that is shared by multiple threads.

  15. Synchronization – Message Queue • The only support Windows CE provided as far as message queue is the point-to-point message queue.

  16. References • Microsoft Website - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcemain4/html/cmconScheduling.asp • Wikipedia - http://en.wikipedia.org/wiki/Windows_CE • HPC factor - http://www.hpcfactor.com/support/windowsce/

More Related