1 / 28

Supporting Time-Sensitive Applications on a GENERAL PURPOSE ( Commodity ) OS

Supporting Time-Sensitive Applications on a GENERAL PURPOSE ( Commodity ) OS. Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Dept of Computer Science , OGI Presenter – PRADEEP ANKALA. Real-Time & General Purpose OS’s.

lacy
Download Presentation

Supporting Time-Sensitive Applications on a GENERAL PURPOSE ( Commodity ) OS

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 GENERAL PURPOSE (Commodity) OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Dept of Computer Science , OGI Presenter – PRADEEP ANKALA CS533

  2. Real-Time & General Purpose OS’s - Real-Time OS: VxWorks, QNX, LynxOS, eCos,DeltaOS, PSX,embOS, ... - GPOS: no support for real-time - applications, focus on ‘fairness’. - BUT, people love GPOSs, e.g., Linux: CS533

  3. Outline • Introduction • Implementing Time-Sensitive Linux • Experiment • Conclusions CS533

  4. Introduction • Time-sensitive Applications ( Ex:multimedia, soft real-time applications. ) • High precision timing facility • Well designed preemptible kernel • Appropriate scheduling technique • Time-Sensitive Requirement • Timing Mechanism • Responsive Kernel • CPU Scheduling Algorithm CS533

  5. Paper’s Contribution • 􀁺 Situation: Linux (and many other OS’s) cannot handle real-time applications • 􀁺 Hypothesis: a few techniques can overcome the limitations of Linux – Firm timer (high resolution) – Fine-grain kernel preemption – Priority and reservation-based scheduling • 􀁺 Good performance and low overhead CS533

  6. Problems and Solutions • 􀁺 Firm Timer reduces timer latency – Low overhead important • 􀁺 Fine-grain kernel preemption reduces preemption latency – Responsive kernel • 􀁺 Good schedulers reduce scheduling latency – Proportion-period scheduler CS533

  7. Kernel Latency CS533

  8. TSL Introduction • Integrated techniques of TSL • Firm timers • One-shot timers • Soft timers • Timer Overshoot • Fine-grained kernel preemptibility • CPU Scheduling • Priority-based • Proportion-period CS533

  9. Firm Timers • One-shot timers - Reprogrammed for next timer interrupt • + Soft timers (reduce interrupt overhead) – Polling at convenient times (e.g., syscall return) (No interrupt, check timer at some check pointers Reduce # of timer interrupts Reduce # of context switches) • +Timer Overshoot – Reduce variance due to soft timer uncertainty • Combination of One-shot timers and Soft timers with system wide timer overshoot parameter CS533

  10. Fine-Grained Kernel Preemptibility Non-preemptible kernel • Sometime interrupt will be deferred • Interrupt is disabled In the critical section Preemption latency under Linux is greater 30ms  Preemptiable kernel • Preemptive anytime when kernel is not accessing shared data • Use spinlock to protect shared data Preemption latency is depend on the max time for which a spinlock is held inside the kernel CS533

  11. Fine-Grained Kernel Preemptibility( cont) • What is a Responsive Kernel? Answer: Preemptible kernel + Explicit preemption • Explicit insertion of preemption point at strategic points inside the kernel • Allow preemption anytime the kernel is not accessing shared data structure • Releasing spin-locks at strategic points in long code sections CS533

  12. CPU Scheduling • Proportion-Period CPU Scheduling • Provide temporal protection • Priority CPU Scheduling • Priority inversion • Highest locking priority protocol (HLP) CS533

  13. Experiment • Evaluate • The behavior of time-sensitive applications running on TSL • The overheads of TSL • Environment : • 1.5 GHz Pentium-4 Intel processor with 512 MB memory • Linux kernel 2.4.16 CS533

  14. Latency in Real Applications(mplayer – a open-source audio/video playerProportion-period scheduler - a kernel-level “application”) Non-kernel CPU load Kernel CPU load File System Load CS533

  15. Non-kernel CPU Load CS533

  16. Kernel CPU Load CS533

  17. File System Load CS533

  18. Proportion-Period Scheduler CS533

  19. System Overhead • Executing code at the newly inserted preemption points • Checking preemption • Executing preemption if needed • Executing firm timers CS533

  20. Checking for Preemption • Memory test • Sequentially access a large array • Fork test • Create 512 processes as soon as possible • File-system test • Repeatedly copy data from a 2MB buffer to 8 MB file CS533

  21. Firm Timers • Costs associated with hard timers exclusively • Interrupt handling and cache pollution • Costs that hard and soft timers have in common • Handling timers and the executing preemption for an expired timer thread • Costs associated with soft timers exclusively • Checking for soft timers CS533

  22. Firm Timers CS533

  23. Firm Timers CS533

  24. Firm Timers CS533

  25. Firm timers Discussion -Firm timers lower overhead when soft-timer checks find timers -Firm timers higher overhead when soft-timer checks find nothing and timer goes off -From their work, firm timers lower when more than 2.1% of timer checks find timer CS533

  26. Firm Timers Discussion ( cont) • Nt = Nh+Ns • Total cost = CcNc+ChNh+CsNs • Pure hardware = ChNt • Total cost < Pure hardware=>Ns/Nc > Cc/(Ch-Cs) CS533

  27. Conclusions • TSL can support applications needing fine-grained resource allocation and low latency response  • Variations of less than 400 microseconds under heavy CPU and file system load  • Overhead is low • Ns/Nc > K condition under which firm timers are effective CS533

  28. Thanks for YOUR PATIENCE In LISTENING    CS533

More Related