Supporting Time-Sensitive Applications on a Commodity OS

Slides:



Advertisements
Similar presentations
Tasks Periodic The period is the amount of time between each iteration of a regularly repeated task Time driven The task is automatically activated by.
Advertisements

Effects of Clock Resolution on the Scheduling of Interactive and Soft Real- Time Processes by Yoav Etsion, Dan Tsafrir, Dror G. Feitelson Presented by.
Project 2 – solution code
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Jonathan.
Supporting Time-sensitive Application on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presented by Wen Sun Some Slides.
Supporting Time-Sensitive Applications on a Commodity OS by Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Jimi Watson.
Cs238 CPU Scheduling Dr. Alan R. Davis. CPU Scheduling The objective of multiprogramming is to have some process running at all times, to maximize CPU.
Supporting Time-sensitive Application on a Commodity OS By Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presenter: Shuping Tien.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
CS533 Concepts of Operating Systems Class 10 Fine Grain Timing.
Wk 2 – Scheduling 1 CS502 Spring 2006 Scheduling The art and science of allocating the CPU and other resources to processes.
By Group: Ghassan Abdo Rayyashi Anas to’meh Supervised by Dr. Lo’ai Tawalbeh.
CS533 Concepts of Operating Systems Class 18 Fine Grain Timing.
1Chapter 05, Fall 2008 CPU Scheduling The CPU scheduler (sometimes called the dispatcher or short-term scheduler): Selects a process from the ready queue.
 Scheduling  Linux Scheduling  Linux Scheduling Policy  Classification Of Processes In Linux  Linux Scheduling Classes  Process States In Linux.
Supporting Time-Sensitive Applications on a Commodity OS A. Goel, L. Abeni, C. Krasic, J. Snow and J. Walpole Proceedings of USENIX 5th Symposium on Operating.
Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill Technology Education Lecture 5 Operating Systems.
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
1 Previous lecture review n Out of basic scheduling techniques none is a clear winner: u FCFS - simple but unfair u RR - more overhead than FCFS may not.
Non-Preemptive Access to Shared Resources in Hierarchical Real-Time Systems Marko Bertogna, Fabio Checconi, Dario Faggioli CRTS workshop – Barcelona, November,
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Budget-based Control for Interactive Services with Partial Execution 1 Yuxiong He, Zihao Ye, Qiang Fu, Sameh Elnikety Microsoft Research.
CPU Scheduling CSCI 444/544 Operating Systems Fall 2008.
TCPivo A High-Performance Packet Replay Engine Wu-chang Feng Ashvin Goel Abdelmajid Bezzaz Wu-chi Feng Jonathan Walpole.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
Lecture 7: Scheduling preemptive/non-preemptive scheduler CPU bursts
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila.
1 VxWorks 5.4 Group A3: Wafa’ Jaffal Kathryn Bean.
Supporting Time Sensitive Application in a Commodity OS Ashvin Goel, Luca, Charles, Jim, Jonathan Walpole Oregon Graduate Institute, Portland Presented.
Processes & Threads Introduction to Operating Systems: Module 5.
Real Time System with MVL. © 2007 MontaVista Confidential | Overview of MontaVista Agenda Why Linux Real Time? Linux Kernel Scheduler Linux RT technology.
CSCI1600: Embedded and Real Time Software Lecture 23: Real Time Scheduling I Steven Reiss, Fall 2015.
CS333 Intro to Operating Systems Jonathan Walpole.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Soft Timers : Efficient Microsecond Software Timer Support for Network Processing - Mohit Aron & Peter Druschel CS533 Winter 2007.
Real-Time Operating Systems RTOS For Embedded systems.
Real-Time Performance of Linux “A Measurement-Based Analysis of the Real-Time Performance of Linux” (L. Abeni, A. Goel, C. Krasic, J. Snow, J. Walpole)
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
Mohit Aron Peter Druschel Presenter: Christopher Head
REAL-TIME OPERATING SYSTEMS
Chapter 19: Real-Time Systems
Lecture 12: Real-Time Scheduling
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
Topics Covered What is Real Time Operating System (RTOS)
Chapter 5a: CPU Scheduling
Networks and Operating Systems: Exercise Session 2
Presented by Kristen Carlson Accardi
Unit OS9: Real-Time and Embedded Systems
EEE 6494 Embedded Systems Design
Chapter 8 – Processor Scheduling
Real-time Software Design
Chapter 6: CPU Scheduling
CS 143A - Principles of Operating Systems
Chapter 5: CPU Scheduling
Chapter 2: The Linux System Part 3
Scheduling Adapted from:
CSCI1600: Embedded and Real Time Software
CPU SCHEDULING.
Multiprocessor and Real-Time Scheduling
Chapter 6: CPU Scheduling
Process Scheduling Decide which process should run and for how long
Presented by Neha Agrawal
Chapter 19: Real-Time Systems
CSCI1600: Embedded and Real Time Software
Processes and operating systems
Time Sources and Timing
Don Porter Portions courtesy Emmett Witchel
Linux Scheduling CSE 2431: Introduction to Operating Systems
Scheduling of Regular Tasks in Linux
Presentation transcript:

Supporting Time-Sensitive Applications on a Commodity OS Ashvin Goel, Luca Abeni, Charles Krasic, Jim Snow, Jonathan Walpole Presenter: Madhura S Rama

Agenda Goal Why TSL? Time Sensitive Requirements TSL Implementation Firm Timers Fine-Grain Kernel Preemptibility CPU Scheduling Experimental Results Conclusion

Goal Integrate efficient support for time-sensitive applications in a commodity OS without significantly degrading the performance of traditional applications.

Why TSL? Soft real-time applications are time sensitive Resources must be allocated at appropriate times Commodity OS provides coarse-grained resource allocation to maximize throughput Conflicts the needs of RTOS Time-sensitive Linux (TSL) - provides good performance to both time-sensitive and throughput–oriented applications.

Time Sensitive Requirements Allocate resources at “appropriate times” Kernel latency – latency between the event and its activation Should be low in a time-sensitive application Three requirements to reduce this latency Preemption Latency Timer Latency Scheduling Latency Time Interrupt Handler Another app Scheduled Wall-clock time event Timer Interrupt Scheduler Application Scheduled (Activation)

Different Timers Periodic Timers One-Shot (Hard) Timers Soft Timers Implemented with Periodic timer interrupts. Max 10ms latency Decrease in latency increases interrupt overhead One-Shot (Hard) Timers Interrupts only when needed Timer reprogramming, fielding interrupts Soft Timers Avoids interrupts Cost of polling, timer latency Firm Timers Combines all the advantages of the above timers Incurs very low overhead

Three key techniques Accurate Timing Mechanism Responsive Kernel Firm Timers Responsive Kernel Lock-breaking preemptible kernel Appropriate CPU Scheduling Algorithm Proportion-Period Scheduler Priority-based Scheduler

Firm Timers Provides accurate timing mechanism with low overhead Combines one-shot timers with soft timers by exposing a timer overshoot parameter One-shot timer is programmed to fire after an overshoot amount of time after the next timer expiry If a system call occurs after a timer has expired but before the one-shot timer expired, soft timers become effective. Reprogram the one-shot timer for the next timer expiry – does not incur any overhead

Overshoot Accuracy vs Overhead tradeoff Reprogram One-shot timer and fire the event Poll for timer expiry User Space System call Kernel Space Overshoot Parameter Time Time-Sensitive Application ready For execution One-shot timer expiry Timer Latency

Firm Timer Implementation Maintains a timer queue for each processor One-shot APIC timer is programmed to generate an interrupt at the next timer expiry event + global overshoot value (can be made dynamic) Soft timers enabled using non-zero timer overshoot value Periodic timer used when a timer needs longer timeout TSL use the standard POSIX interface calls - modified the implementation to use firm timers

Fine-Grained Kernel Premptibility Kernel latency increases with increase in the length of the non-preemptible critical section Approaches to reduce kernel latency Explicit insertion of preemption points Allow preemption anytime the kernel is not accessing shared data structures Robert Love’s lock-breaking preemptible kernel

CPU Scheduling Uses a combination of Proportion-Period CPU Scheduling Priority CPU Scheduling

Proportion-Period CPU Scheduling Provides “temporal protection” by allocating each task a fixed proportion of the CPU at each task period Proportion can be assigned either statically or dynamically using a feedback mechanism Improves accuracy of scheduling analysis 2/3 T1 Proportion Time Period 1/3 T2 Time Proportion

Priority CPU Scheduling Real-time priorities assigned based on application needs TSL schedules fixed priority tasks in the background Exception: Shared server tasks -> Priority Inversion Use Highest locking priority protocol (HLP) to cope with priority inversion Minimizes scheduling Latency

Latency in Real Applications

System Overhead

Conclusion TSL can support applications requiring fine-grained resource allocation and low latency TSL is truly a general-purpose system – can be used effectively for both time-sensitive and throughput-oriented applications

Backup Experimental Results Firm timers are effective in reducing the overhead of one-shot timers when the ratio of number of the soft timers that fire to the number of soft timer checks is sufficiently large (2.1%) Overhead of TSL on throughput-oriented applications is low Provides allocation to time-sensitive applications with a variation of less than 400 usec even under heavy load.