140 likes | 320 Views
Dreams in a Nutshell. Microsoft Research Institute Department of Computing Macquarie University. Steven Sommer steve@mpce.mq.edu.au. Overview. 1. Background 2. Dreams Model 3. Overrun 4. Implementation. Dreams. Distributed Real-time Extensions with Application to Multimedia Systems
E N D
Dreams in a Nutshell Microsoft Research Institute Department of Computing Macquarie University Steven Sommer steve@mpce.mq.edu.au
Overview 1. Background 2. Dreams Model 3. Overrun 4. Implementation USENIX Windows NT Workshop
Dreams • Distributed Real-time Extensions with Application to Multimedia Systems • Extend conventional operating systems to support distributed real-time applications • Paradigm preserving USENIX Windows NT Workshop
Key Paradigm Differences • Multiple competing applications • Temporal protection • Absence of a priori knowledge • Different kinds of applications • Subsystems (servers) • Interrupts • Dynamic distribution USENIX Windows NT Workshop
2. The Dreams Model • Transient Periodic Processes • Periodic Invocations • Specified • Period • Deadline • Execution Time USENIX Windows NT Workshop
Application Create Real-Time Process 100% Free Make Reservation Schedulability Test P5 Process Manager Reservations Manager P1 Reserved Distribute P9 Yes / No Yes / No Create the Process System 0% Real-Time Ready-to-Run Queue Scheduler Process Table CPU 80486 Allocate to CPU P1 P5 P9 P1 P9 P5 Add Process Enforcer The Dreams Model 6
3. Overrun Concepts • System guarantee: • A real-time task will receive its reserved resources between each invocation’s start-time and deadline • A task which consumes its reserved capacity without completing has overrun • Only overrun tasks can miss their deadlines • Task continues in overrun state • Overrun tasks receive refreshed resources at the start of their next period USENIX Windows NT Workshop
Scheduling and Overrun Waiting Invocation Completion Invocation’s Start Time Scheduled Thread Runnable Invocation Overrun Overrun Try Overrun Overrun Leave 8
Sample Schedule Process Period Reservation Av. Execution Time first scheduled T1 100 20 20 ~70 T2 250 110 100 ~70 T3 1000 440 400 ~480 . = 10ms 0 100 200 300 400 Time ID 01234567890123456789012345678901234567890123456789 ---- 4500 1 .......RC........RC........RC........RC........R1O 4500 2 .......SR2222222C...............R22222R22C........ 4500 3 33333333........R3R333333333R3333........R333333.R 5000 1 .......C.........R1O..RC...R1C.......R1O..C....R1O 5000 2 .......R2222222C................R22222.R22C....... 5000 3 33333333.......R33.R33C.........................SR 5500 1 .......C.........R1O.......C.........R1O.......C.. 5500 2 .......R2222222C................R22222.R22C....... 5500 3 33333333.......R33.R3333333R33333.........R3333R33 Legend:(S)tart(time) (R)un (scheduled) (C)ompleted (O)verrunMultiple
4. Implementation • Windows NT 3.51 implementation • Minimal impact on: • Non-real-time execution • Existing operating system code • Programming paradigm
OS/2® Client POSIX Client POSIX Subsystem OS/2 Subsystem Dreams Client Win32™ Client Applications Protected subsystems (servers) Dreams Subsystem Win32 Subsystem User mode Executive Kernel mode System services I/O manager Virtual Memory Manager Security Reference Monitor Local Procedure Call Object Manager Process Manager File systems Cache manager Device drivers Kernel Network drivers Hardware abstraction layer Message Passing / Shared Memory System Trap 11
Dreams Client Application Memory Space Dreams Subsystem Memory Space Reservation Manager Application Process Real-Time Thread Manager API Call Dreams DLL Procedure call via named pipes Blocking Access Non real-time priority Shared Data Area Requests / Process Table Create Thread Real-time priority Non blocking access Real-Time Thread Real-Time Scheduler + Enforcer Non blocking communication API Call Periodic Invocation Dreams DLL Shared Memory Kernel Call Window NT Kernel Scheduling via NT Priority Control Kernel Mode Dreams 12
Implementation Experience Dreams extensions in a subsystem Meet implementation goals Simpler development, modification, and testing Priority inheritance Useful in all operating systems (not just real-time) Performance improvement Two tiered scheduler (with priority inheritance) Hides scheduling complexities Simpler scheduling Simpler schedulability model Simpler timing and enforcement
Summary • Background • Dreams Model • Overrun • Implementation USENIX Windows NT Workshop