1 / 21

Jimi Watson

Supporting Time-Sensitive Applications on a Commodity OS by Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole. Jimi Watson. Why?. Time sensitive applications Enhancing resource allocation Throughput Insignificant degradation. Four keys. Timing mechanisms Timer latency

romeo
Télécharger la présentation

Jimi Watson

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. Supporting Time-Sensitive Applications on a Commodity OSbyAshvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Jimi Watson

  2. Why? • Time sensitive applications • Enhancing resource allocation • Throughput • Insignificant degradation

  3. Four keys • Timing mechanisms • Timer latency • Responsive Kernel • Preemption latency • CPU scheduling algorithm • Scheduling latency • Use them all

  4. Timers • Periodic timers • The old model • Shortest period 10msec • One-shot timers • Interrupts at specific instance • Reprogram • Soft timers • Handles events at soft timer points

  5. Timers Comparison • Hard timers • Interrupt handling • Cache pollution • Soft timers • Polling for expired events • Firm timers • Better precision • Fewer interupts

  6. Firm Timers • Combination of soft and one shot timers • Use soft timers to reduce overhead • Use one-shot timers to ensure events are handled • Overshoot

  7. Example of overshoot 0 5 10 Time Last event handled Next event Overshoot

  8. Firm timer implementation • Timer queue • APIC is set to next timer event plus global overshoot value • Possible to have overshoot for separate timers • Apps with tighter constraints incur penalty • Overhead is simply additional queue and overshoot • Periodic timers used for long timeouts • One shot timers only within 1 tick period • POSIX interface calls altered to take advantage of firm timers on TSL

  9. Kernel preemptibility • May not be preemtible • Interrupts disabled • Executing in critical section • Solution • Shorten the length it is not preemptible • Explicit preemption points • Lock breaking preemtible kernel

  10. Scheduling • Proportion-Period scheduling • Priority CPU scheduling

  11. Proportion-Period scheduling • Temporal protection • Every time sensitive task requires specification of proportion and period • Proportion is how much CPU it needs • Period is how often the task needs CPU to guarantee proper function

  12. Proportion Scheduling CPU CPU CPU CPU Time Periods

  13. Priority scheduling • Priority assigned based on application needs • Run in the background • Priority inversion

  14. Priority inversion

  15. Testing • Compare Linux, soft timers, hard timers and firm timers • Multiple applications • Each require 10 msec intervals

  16. 20 processes, 10 msec

  17. 50 processes , 10 msec

  18. 20 processes, 1 msec

  19. Testing • Difference between hard and firm timers • Firm timers have lower overhead when a percentage of soft timers fire per poll • Ns/Nc > 2.1 % • Variation > 400 usec under heavy loads • Low overhead on throughput loads

  20. Conclusions • Better performance for all applications • Gracefully handles soft real time apps • Very little impact on throughput • Useful general purpose OS

More Related