CPU-Inheritance Scheduling
|
|
- Brenda Miller
- 5 years ago
- Views:
Transcription
1 CPU-Inheritance Scheduling Bryan Ford & Sai Susarla (presented by Stefan Kalkowski) January 24, 2007 ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 1 / 12
2 Focus multiple scheduling policies count CPU usage avoid priority inversion generalized notion of priority inheritance ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 2 / 12
3 Flexible scheduling variety of concurrent uses control of resource usage no policy in kernel arbitrary threads act as schedulers ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 3 / 12
4 Basic design threads schedule other threads every thread might donate its CPU to someone else one root scheduler thread foreach CPU the dispatcher fields and delivers events important events: blocking, ready, out of CPU time ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 4 / 12
5 Basic design threads schedule other threads every thread might donate its CPU to someone else one root scheduler thread foreach CPU the dispatcher fields and delivers events important events: blocking, ready, out of CPU time ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 4 / 12
6 Basic design threads schedule other threads every thread might donate its CPU to someone else one root scheduler thread foreach CPU the dispatcher fields and delivers events important events: blocking, ready, out of CPU time ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 4 / 12
7 Basic design threads schedule other threads every thread might donate its CPU to someone else one root scheduler thread foreach CPU the dispatcher fields and delivers events important events: blocking, ready, out of CPU time ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 4 / 12
8 Scheduling hierarchy Background Realtime Webbrowser Gang Scheduler Root Dispatcher ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 5 / 12
9 Voluntary Donation thread waits for an event: obtaining a lock a server response explicitly or implicitly donate CPU ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 6 / 12
10 Scheduling schedule syscall: donates and waits for event WAKEUP ON BLOCK : normal behaviour WAKEUP ON SWITCH : if target blocks return to grandparent WAKEUP ON CONFLICT : scheduler gets informed only when more then one thread are ready ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 7 / 12
11 Scheduling schedule syscall: donates and waits for event WAKEUP ON BLOCK : normal behaviour WAKEUP ON SWITCH : if target blocks return to grandparent WAKEUP ON CONFLICT : scheduler gets informed only when more then one thread are ready ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 7 / 12
12 Scheduling schedule syscall: donates and waits for event WAKEUP ON BLOCK : normal behaviour WAKEUP ON SWITCH : if target blocks return to grandparent WAKEUP ON CONFLICT : scheduler gets informed only when more then one thread are ready ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 7 / 12
13 Scheduling schedule syscall: donates and waits for event WAKEUP ON BLOCK : normal behaviour WAKEUP ON SWITCH : if target blocks return to grandparent WAKEUP ON CONFLICT : scheduler gets informed only when more then one thread are ready ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 7 / 12
14 Multiprocessors multithreaded scheduler with shared variables scheduler threads listen on one port scheduler activations ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 8 / 12
15 Timing schedulers register timeouts CPU usage accounting straight forward for root scheduler for accurate CPU accounting within the tree, schedulers have to communicate with each other ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 9 / 12
16 Threads with multiple scheduling policies Multimedia scenario Mpeg-Player Real-time Time-sharing Root Dispatcher ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 10 / 12
17 Test scenario ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 11 / 12
18 Observed effects load insulation as expected avoids priority inversion 100% increase of context switches ryan Ford & Sai Susarla (presented by Stefan Kalkowski) CPU-Inheritance Scheduling 12 / 12