Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav...
-
Upload
cody-hoover -
Category
Documents
-
view
213 -
download
0
Transcript of Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav...
![Page 1: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/1.jpg)
Effects of Clock Resolution on the Scheduling of Interactive and Soft Real-Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson
Presented by James Volpe
![Page 2: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/2.jpg)
2
Key Points
Modern interactive applications not supported in commodity operating systems
Instead of specialized APIs, tune commodity operating systems
Clock interrupt rates unchanged last 30 years Increasing clock interrupt rate can help Additional overhead is acceptable
![Page 3: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/3.jpg)
3
Real-time Problem
Xine MPEG player
Short clip of 500 frames
![Page 4: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/4.jpg)
4
Process Scheduling
run queuetask_sched
sleep queue
process xxwaiting for IO
process xywaiting for time jiffies
to display frame
process xzwaiting for
network
if another resourcerequired, back to
sleep queue
single CPU
if time slice completeand
process not finished then
back to run queue
Execute for every interrupt Increase jiffiesBill process using CPUAdjust prioritesCheck task prioritiesetc . . .
* modified from Simone Demblon,Sebastian Spitzner
100 Hz
![Page 5: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/5.jpg)
5
Process Scheduling Cont.
Commodity operating systems use priority-based scheduling
Static and dynamic priorities High CPU usage, the lower the priority Conflict with modern multimedia
applications
![Page 6: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/6.jpg)
6
Real-time Problem Up Close
![Page 7: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/7.jpg)
7
Related Work
RT-Linux, one-shot timers, soft timers, firm timers and priority adjustments
Require special APIs and/or non-trivial modifications to the system
Why not increase the clock interrupt rate and see what happens?
![Page 8: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/8.jpg)
8
Motivation
100 Hz clock interrupt rates10 MHz CPU 100,000 instructions/interrupt1 GHz CPU 10,000,000 instructions/interrupt
Clock interrupt rate has become too coarse Two orders of magnitude of additional
instructions per interrupt
![Page 9: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/9.jpg)
9
Benefits of High Tick Rate
Take advantage of today’s faster processors
Better timing for meeting deadlines Accurate billing of processes
![Page 10: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/10.jpg)
10
Test Platform
Pentium 90 to Pentium-IV 2.4 GHz Measurements done on 664 MHz Pentium III Linux kernel 2.4.8 (RedHat 7.0) Klogger used for logging scheduling related
events: context switching, recalculation of priorities, forks, execs
Workload from Emacs, Xine, Quake 3, CPU-bound processes
![Page 11: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/11.jpg)
11
Timing Advantage
![Page 12: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/12.jpg)
12
Timing Advantage
![Page 13: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/13.jpg)
13
Billing Advantage
Application
Billing ratio Missed quanta
@100Hz @1000Hz @100Hz @1000Hz
Emacs 1.0746 0.9468 95.96% 73.42%
Xine 1.2750 1.0249 89.46% 74.81%
Quake 1.0310 1.0337 54.17% 23.23%
X Servero 0.0202 0.9319 99.43% 64.05%
CPU-bound 1.0071 1.0043 7.86% 7.83%
CPU+Quake 1.0333 1.0390 26.71% 2.36%o When running Xine
Table 3. Scheduler billing success rate
![Page 14: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/14.jpg)
14
Billing Advantage Cont.
![Page 15: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/15.jpg)
15
The Cost Is Overhead
More clock interrupts increases overhead Time needed to process interrupts Higher number of context switches Operating systems become less efficient
as clock rate increases
![Page 16: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/16.jpg)
16
Clock Interrupt Overhead Do operating systems become as fast as
hardware?
Table 1. Interrupt processing overheads on different processor generations
Processor
Default Without 8253
Cycles μs Cycles μs
P-90 814±180 9.02 498±466
5.53
PP-200 1654±553 8.31 462±762
2.32
PII-350 2342±303 6.71 306±311
0.88
PIII-664 3972±462 5.98 327±487
0.49
PIII-1.133 6377±602 5.64 426±914
0.38
PIV-2.4 14603±436
6.11 445±550
0.19
A1.467 10494±396
7.15 202±461
0.14
![Page 17: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/17.jpg)
17
Clock Interrupt Overhead Cont. Do operating systems become as fast as
hardware?
Processor
Context switch Cache BW MB/s
Trap
Cycles μs Cycles μs
P-90 1871±656
20.75 28±1 153±24 1.70
PP-200 1530±389
7.69 705±26 379±75 1.91
PII-350 1327±331
3.80 1314±29 343±68 0.98
PIII-664 1317±424
1.98 2512±32 348±163
0.52
PIII-1.133 1330±441
1.18 4286±82 364±278
0.32
PIV-2.4 3792±857
1.59 3016±47 1712±32
0.72
A1.467 1436±477
0.98 3962±63 274±20 0.19
Table 2. Other overheads on different processor generations
![Page 18: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/18.jpg)
18
Clock Interrupt Overhead Cont.
Overhead from sorting an array with 50ms quantum
![Page 19: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/19.jpg)
19
Clock Interrupt Overhead Cont.
Overhead from sorting an array with quantum equal to 5 ticks
![Page 20: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/20.jpg)
20
Conclusion
Increasing clock interrupt rate to 1000 Hz achieves timing and billing advantages
Overhead is minimal Suggest making a settable parameter
instead of compiled constant
![Page 21: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/21.jpg)
21
Evaluation
Results are promising Production level example would
strengthen argument Changing clock interrupt rate in Linux not
an end user job Testing is needed for implementation
![Page 22: Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.](https://reader035.fdocuments.us/reader035/viewer/2022062714/56649d0c5503460f949e01ba/html5/thumbnails/22.jpg)
22
Questions / Discussion