Operating system support for low-latency streaming

Streaming applications such as voice-over-IP and soft modems running on commodity operating systems (OSs) are becoming common today. These applications are characterized by tight timing constraints that must be satisfied for correct operation. For example, voice-over-IP systems have one-way delay requirements of 150–200 ms where only a third of that time can be spent in the operating system and in the application layers. Similarly, soft modems require periodic execution with low jitter every 12.5 ms from the operating system. To satisfy the timing requirements of these low-latency streaming applications, the operating system (OS) must allow fine-grained scheduling so that applications can be scheduled at precisely the time they require execution. Unfortunately, the metric traditionally used to evaluate current general-purpose OSs focuses on application throughput rather than latency. Consequently, current operating systems use mechanisms such as coarse-grained timers and schedulers, and large packets to amortize operating system “overhead” over long periods of application-level work. This approach has the effect of improving throughput at the expense of latency. Similarly, current OSs have large nonpreemptible sections and use large kernel buffers to improve CPU throughput. All of these mechanisms result in increased latency in the kernel, which conflicts with the timing requirements of low-latency applications because it reduces control over the precise times at which applications can be scheduled. This dissertation shows that general-propose OSs can be designed to support low-latency applications without significantly affecting the performance of traditional throughput-oriented applications. We identify and experimentally evaluate the major sources of latency in current OSs and show that these latencies have three main causes: timing mechanisms, non preemptible kernel sections and output buffering. We propose three techniques, firm timers, fine-grained kernel preemptibility, and adaptive send-buffer tuning for reducing each of these sources of latency. The firm timers mechanism provides accurate timing with low overhead. We use fine-grained kernel preemptibility to obtain a responsive kernel. Adaptive send-buffer tuning helps to minimize buffering delay in the kernel for TCP-based streaming applications. These techniques have been integrated in our extended version of the Linux kernel, which we call Time-Sensitive Linux (TSL). Our evaluation shows that TSL can be used by streaming applications with much tighter timing constraints than standard Linux can support, and that it does not significantly degrade the performance of throughput-oriented applications. Low kernel latency in TSL enables fine-grained, feedback-based scheduling for supporting the needs of low-latency applications. Traditionally, real-time scheduling mechanisms have been used to provide predictable scheduling latency. However, these mechanisms are difficult to use in general-purpose OSs because they require precise specification of application requirements in terms of low-level resources. Such a specification may not be statically available in this environment. Hence, this thesis presents the design, implementation and evaluation of a novel feedback-based real-rate scheduler that automatically infers application requirements and thus makes it easier to use real-time scheduling mechanisms on general-purpose OSs. To be effective, feedback scheduling requires fine-grained resource monitoring and actuation. TSL, unlike conventional OSs, supports both these requirements because it provides precise timing control. Such control has enabled us to implement time-sensitive applications such as gscope, a software oscilloscope, and TSPivo, a software network traffic generator.

[1]  Kostas Pentikousis,et al.  TCP with ECN: Performance Gains for Large Transfers , 2001 .

[2]  Jonathan Walpole,et al.  Supporting low latency TCP-based media streams , 2002, IEEE 2002 Tenth IEEE International Workshop on Quality of Service (Cat. No.02EX564).

[3]  Jonathan Walpole,et al.  Supporting time-sensitive applications on a commodity OS , 2002, OSDI '02.

[4]  Ramesh Govindan,et al.  Scheduling and IPC mechanisms for continuous media , 1991, SOSP '91.

[5]  Dawson R. Engler,et al.  Checking system rules using system-specific, programmer-written compiler extensions , 2000, OSDI.

[6]  Harrick M. Vin,et al.  A hierarchial CPU scheduler for multimedia operating systems , 1996, OSDI '96.

[7]  V. Jacobson,et al.  Congestion avoidance and control , 1988, CCRV.

[8]  Scott Shenker,et al.  Observations on the dynamics of a congestion control algorithm: the effects of two-way traffic , 1991, SIGCOMM '91.

[9]  Stefan Savage,et al.  Processor capacity reserves: operating system support for multimedia applications , 1994, 1994 Proceedings of IEEE International Conference on Multimedia Computing and Systems.

[10]  Vaduvur Bharghavan,et al.  Relative Delay Differentiation and Delay Class Adaptation in Core-Stateless Networks. , 2000, INFOCOM 2000.

[11]  Van Jacobson,et al.  An Expedited Forwarding PHB , 1999, RFC.

[12]  John Regehr,et al.  Augmented CPU reservations: towards predictable execution on general-purpose operating systems , 2001, Proceedings Seventh IEEE Real-Time Technology and Applications Symposium.

[13]  Ion Stoica,et al.  Duality between resource reservation and proportional share resource allocation , 1996, Electronic Imaging.

[14]  Gene F. Franklin,et al.  Feedback Control of Dynamic Systems , 1986 .

[15]  L. Alvisi,et al.  A Survey of Rollback-Recovery Protocols , 2002 .

[16]  Peter Druschel,et al.  TCP: Improving Startup Dynamics by Adaptive Timers and Congestion Control , 1998 .

[17]  Robert C. Daley,et al.  An experimental time-sharing system , 1962, AIEE-IRE '62 (Spring).

[18]  Michael González Harbour,et al.  Work-in-Progress Session , 2002, ECRTS.

[19]  Giuseppe Lipari,et al.  Compensating for Interrupt Process Times in Real-Time Multimedia Systems , 2001 .

[20]  Calton Pu,et al.  Control and modeling issues in computer operating systems: resource management for real-rate computer applications , 2000, Proceedings of the 39th IEEE Conference on Decision and Control (Cat. No.00CH37187).

[21]  Kimberly C. Claffy,et al.  Measurement and visualization of internet connectivity and performance , 2001 .

[22]  Kai Li,et al.  Libckpt: Transparent Checkpointing under UNIX , 1995, USENIX.

[23]  Miguel de Icaza,et al.  The GNOME desktop environment , 1998 .

[24]  Kevin Jeffay,et al.  A Rate-Based Execution Abstraction for Multimedia Computing , 1995, NOSSDAV.

[25]  Craig Partridge,et al.  A Simulation Study of Paced TCP , 2000 .

[26]  J.-Y. Le Boudec,et al.  A proposal for an asymmetric best-effort service , 1999, 1999 Seventh International Workshop on Quality of Service. IWQoS'99. (Cat. No.98EX354).

[27]  Kang G. Shin,et al.  Techniques for Eliminating Packet Loss in Congested TCP/IP Networks , 1997 .

[28]  Sang Hyuk Son,et al.  The case for feedback control real-time scheduling , 1998, Proceedings of 11th Euromicro Conference on Real-Time Systems. Euromicro RTS'99.

[29]  Deborah Estrin,et al.  RAP: An end-to-end rate-based congestion control mechanism for realtime streams in the Internet , 1999, IEEE INFOCOM '99. Conference on Computer Communications. Proceedings. Eighteenth Annual Joint Conference of the IEEE Computer and Communications Societies. The Future is Now (Cat. No.99CH36320).

[30]  Harrick M. Vin,et al.  A hierarchial CPU scheduler for multimedia operating systems , 1996, OSDI '96.

[31]  Donald F. Towsley,et al.  Playback restart in interactive streaming video applications , 1997, Proceedings of IEEE International Conference on Multimedia Computing and Systems.

[32]  Calton Pu,et al.  A feedback-driven proportion allocator for real-rate scheduling , 1999, OSDI '99.

[33]  Wu-chi Feng,et al.  Quality-adaptive media streaming by priority drop , 2003, NOSSDAV '03.

[34]  Wu-chi Feng,et al.  Priority-based technique for the best-effort delivery of stored video , 1998, Electronic Imaging.

[35]  Mahadev Satyanarayanan,et al.  Agile application-aware adaptation for mobility , 1997, SOSP.

[36]  Srinivasan Seshan,et al.  An integrated congestion management architecture for Internet hosts , 1999, SIGCOMM '99.

[37]  John Regehr,et al.  Inferring Scheduling Behavior with Hourglass , 2002, USENIX Annual Technical Conference, FREENIX Track.

[38]  Jie Huang,et al.  Adaptive live video streaming by priority drop , 2003, Proceedings of the IEEE Conference on Advanced Video and Signal Based Surveillance, 2003..

[39]  Helen Custer,et al.  Inside Windows NT , 1992 .

[40]  Parameswaran Ramanathan,et al.  Proportional differentiated services: delay differentiation and packet scheduling , 2002, TNET.

[41]  Donald F. Towsley,et al.  Parity-based loss recovery for reliable multicast transmission , 1997, TNET.

[42]  Mark Handley,et al.  Problem Statement for DCCP , 2002 .

[43]  QUTdN QeO,et al.  Random early detection gateways for congestion avoidance , 1993, TNET.

[44]  Luca Abeni Coping with interrupt execution time in RT kernels: A non-intrusive approach , 2001, RTSS 2001.

[45]  Matthew Mathis,et al.  Automatic TCP buffer tuning , 1998, SIGCOMM '98.

[46]  Erik J. Johnson,et al.  IXP-1200 Programming , 2002 .

[47]  Calton Pu,et al.  Using feedback control for a network and CPU resource management application , 2001, Proceedings of the 2001 American Control Conference. (Cat. No.01CH37148).

[48]  Michael B. Jones,et al.  CPU reservations and time constraints: efficient, predictable scheduling of independent activities , 1997, SOSP.

[49]  Ramesh C. Jain TeleExperience: communicating compelling experience , 2001, MULTIMEDIA '01.

[50]  John Chapin,et al.  The Vanu Software Radio System , 2003 .

[51]  Gene F. Franklin,et al.  Digital control of dynamic systems , 1980 .

[52]  Calton Pu,et al.  Fine-Grain Adaptive Scheduling using Feedback , 1989, Comput. Syst..

[53]  Sally Floyd,et al.  TCP Selective Acknowledgement Options , 1996 .

[54]  Sally Floyd,et al.  TCP Selective Acknowledgment Options , 1996, RFC.

[55]  Hussein M. Abdel-Wahab,et al.  A proportional share resource allocation algorithm for real-time, time-shared systems , 1996, 17th IEEE Real-Time Systems Symposium.

[56]  Jonathan Walpole,et al.  A mea-surement-based analysis of the real-time performance of the Linux kernel , 2002 .

[57]  Jonathan Walpole,et al.  A measurement-based analysis of the real-time performance of linux , 2002, Proceedings. Eighth IEEE Real-Time and Embedded Technology and Applications Symposium.

[58]  Michel Dagenais,et al.  Measuring and Characterizing System Behavior Using Kernel-Level Event Logging , 2000, USENIX Annual Technical Conference, General Track.

[59]  Ioannis Lambadaris,et al.  Performance Evaluation of Explicit Congestion Notification (ECN) in IP networks , 2000, Multimedia Information Systems.

[60]  Michael B. Jones,et al.  An overview of the Rialto real-time architecture , 2001 .

[61]  Hideyuki Tokuda,et al.  Preemptibility in real-time operating systems , 1992, [1992] Proceedings Real-Time Systems Symposium.

[62]  Chung Laung Liu,et al.  Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment , 1989, JACM.

[63]  T. Başar,et al.  A New Approach to Linear Filtering and Prediction Problems , 2001 .

[64]  A. L. Narasimha Reddy Improving latency in an interactive video server , 1997, Electronic Imaging.

[65]  Amit Aggarwal,et al.  Understanding the performance of TCP pacing , 2000, Proceedings IEEE INFOCOM 2000. Conference on Computer Communications. Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies (Cat. No.00CH37064).

[66]  Victor Yodaiken,et al.  A Real-Time Linux , 2000 .

[67]  P. Mantegazza,et al.  RTAI: Real Time Application Interface , 2000 .

[68]  Klara Nahrstedt,et al.  CPU service classes for multimedia applications , 1999, Proceedings IEEE International Conference on Multimedia Computing and Systems.

[69]  Matthew Mathis,et al.  The Rate-Halving Algorithm for TCP Congestion Control , 1999 .

[70]  P. Druschel,et al.  Soft timers: efficient microsecond software timer support for network processing , 2000, OPSR.

[71]  Jonathan Walpole,et al.  Gscope: A Visualization Tool for Time-Sensitive Software , 2002, USENIX Annual Technical Conference, FREENIX Track.

[72]  John V. Guttag,et al.  Virtual radios , 1999, IEEE J. Sel. Areas Commun..

[73]  Jonathan Walpole,et al.  The Case for Streaming Multimedia with TCP , 2001, IDMS.

[74]  Shanwei Cen,et al.  A software feedback toolkit and its application in adaptive multimedia systems , 1998 .

[75]  David K. Y. Yau,et al.  Adaptive rate-controlled scheduling for multimedia applications , 1997, TNET.

[76]  Sally Floyd,et al.  Simulation-based comparisons of Tahoe, Reno and SACK TCP , 1996, CCRV.

[77]  Calton Pu,et al.  Threads and input/output in the synthesis kernal , 1989, SOSP '89.

[78]  William E. Weihl,et al.  Lottery scheduling: flexible proportional-share resource management , 1994, OSDI '94.

[79]  Martin May,et al.  Aggregate traffic performance with active queue management and drop from tail , 2001, CCRV.

[80]  Lixia Zhang,et al.  Stream Control Transmission Protocol , 2000, RFC.

[81]  David Mosberger,et al.  Bert: a scheduler for best-effort and realtime paths , 1998 .

[82]  David L. Mills,et al.  Network Time Protocol (Version 3) Specification, Implementation and Analysis , 1992, RFC.

[83]  Luigi Rizzo,et al.  Effective erasure codes for reliable computer communication protocols , 1997, CCRV.

[84]  Randy Brown,et al.  Calendar queues: a fast 0(1) priority queue implementation for the simulation event set problem , 1988, CACM.

[85]  Rudolph van der Merwe,et al.  The square-root unscented Kalman filter for state and parameter-estimation , 2001, 2001 IEEE International Conference on Acoustics, Speech, and Signal Processing. Proceedings (Cat. No.01CH37221).

[86]  Michael B. Jones,et al.  Predictability requirements of a soft modem , 2001, SIGMETRICS '01.

[87]  Jason Nieh,et al.  The design, implementation and evaluation of SMART: a scheduler for multimedia applications , 2001 .

[88]  Scott Shenker,et al.  Observations on the dynamics of a congestion control algorithm: the effects of two-way traffic , 1991, SIGCOMM 1991.

[89]  Edward Y. Chang,et al.  BubbleUp: low latency fast-scan for media servers , 1997, MULTIMEDIA '97.

[90]  Ragunathan Rajkumar,et al.  Linux/RK: A Portable Resource Kernel in Linux , 2005 .

[91]  Kwei-Jay Lin,et al.  Enhancing the real-time capability of the Linux kernel , 1998, Proceedings Fifth International Conference on Real-Time Computing Systems and Applications (Cat. No.98EX236).

[92]  Bryan Ford,et al.  CPU inheritance scheduling , 1996, OSDI '96.

[93]  David L. Black,et al.  The Addition of Explicit Congestion Notification (ECN) to IP , 2001, RFC.

[94]  Matthew Mathis,et al.  Forward acknowledgement: refining TCP congestion control , 1996, SIGCOMM '96.

[95]  Lui Sha,et al.  Priority Inheritance Protocols: An Approach to Real-Time Synchronization , 1990, IEEE Trans. Computers.

[96]  George C. Polyzos,et al.  Traffic characteristics of the T1 NSFNET backbone , 1993, IEEE INFOCOM '93 The Conference on Computer Communications, Proceedings.

[97]  Deborah Estrin,et al.  Quality adaptation for congestion controlled video playback over the Internet , 1999, SIGCOMM '99.

[98]  Jonathan Walpole,et al.  Analysis of a reservation-based feedback scheduler , 2002, 23rd IEEE Real-Time Systems Symposium, 2002. RTSS 2002..

[99]  Shivkumar Kalyanaraman,et al.  Comparative study of RED, ECN and TCP Rate Control , 1999 .

[100]  Vern Paxson,et al.  TCP Congestion Control , 1999, RFC.