Introduction
Supporting Time-Sensitive Applications on a Commodity OS
by: Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole presented by: Dora Raymaker
Introduction Supporting Time-Sensitive Applications on a Commodity - - PowerPoint PPT Presentation
Introduction Supporting Time-Sensitive Applications on a Commodity OS by: Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole presented by: Dora Raymaker Background: Real-Time and Time Sensitive Applications Real-Time
by: Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole presented by: Dora Raymaker
– Must meet an exact deadline – Failure to meet deadline means system failure
– Application with real-time requirements – Examples: A/V media, soft modems – Emphasis on:
– Low latency – Precise timing – Effective scheduling
– Timers and interrupts – Preemption – CPU scheduling – Resource sharing
– Effectively run time-sensitive applications – Effectively run throughput applications – Be implemented without modifying existing
– Three areas of latency – Three solutions needed
– too often -> lots of interrupt overhead – too sparse -> can't do real time
– One-Shot Timer only goes off when needed
– Hardware solution – Can have high cost in interrupts
– High cost of interrupts
– Soft timers handle events without interrupts – Coordinate with CPU
– Software solution – Can have problematic latency
– high = soft – low = one-shot – provides upper
– Threads executing in kernel cannot be
– Specify yield points in kernel code
– No locks
– Latency maximum time between yields – Hard to implement – Dependent on system call paths
– Threads executing in kernel cannot be
– Protect kernel data with locks
– Easy to implement – Not dependent on system call paths
– Not efficient if data sections are large – Latency maximum time lock held
– Highest priority task goes first – Task acquires resource – Task gets highest priority of any task
– Simple – Avoids priority inversion
– Does not provide temporal protection
– Allocate task fixed proportion P of total
– Allocated time Q = P * T – Task executes for Q, then blocks or
– Provides temporal protection
– P and T must be specified
– Mplayer – Proportion-Period Scheduler
– Cost of fine-grained preemption – Cost of executing firm timers
– non-kernel CPU stress test – kernel CPU buffer – file CPU file system copy
– no file system load – file system copy
– memory access – fork – file system access
– TSL overhead .42 +/- .18%
– TSL overhead .53 +/- .06%
– TSL no significant overhead
– Linux – TSL hard timers – TSL soft timers – TSL firm timers at various offsets
– Similar results for more timers
– Strengths / weaknesses of each type of timer – Needs of system
– Firm timers and timing – Network effects – Real workloads
– Problem identification – Hypothesis formation – ...
– Speed vs. accuracy – Performance vs. ease – Resources – ...
–Luca Abeni, Ashvin Goel, Charles Krasic, Jim Snow, and Jonathan Walpole. A
measurement-based analysis of the real-time performance of the Linux kernel. In Real Time Technology and Applications Symposium (RTAS), September 2002.
–Mohit Aron and Peter Druschel. Soft timers: Efficient microsecond software timer
support for network processing. ACM Transactions on Computer Systems, August 2000.
–Robert Love. The Linux kernel preemption project.
http://kpreempt.sf.net.
–Mohit Arong. Soft timers.
http://www.cs.rice.edu/CS/Systems/Soft-timers/code/README.html
–Beal, David. Linux as a real time operating system.
www.freescale.com/files/soft_dev_tools/doc/white_paper/CWLNXRTOSWP. pdf
–Wikipedia for overview of real time systems