Multimedia Applications Require Adaptive CPU Scheduling. Veronica Baiceanu, Crispin Cowan, Dylan McNamee, Calton Pu, and Jonathan Walpole

Similar documents
Adaptive Methods for Distributed Video Presentation. Oregon Graduate Institute of Science and Technology. fcrispin, scen, walpole,

Adaptive Real-time Monitoring Mechanism for Replicated Distributed Video Player Systems

Multimedia-Systems. Operating Systems. Prof. Dr.-Ing. Ralf Steinmetz Prof. Dr. rer. nat. Max Mühlhäuser Prof. Dr.-Ing. Wolfgang Effelsberg

MPEG Video Audio Player? Shanwei Cen, Calton Pu, Richard Staehli, Crispin Cowan and Jonathan Walpole

Real-time Multiple Video Player Systems

Feedback-based dynamic proportion allocation for disk I

On Latency Management in Time-Shared Operating Systems *

PROCESS SCHEDULING II. CS124 Operating Systems Fall , Lecture 13

Quality of Service Semantics for Multimedia Database Systems

Processor Capacity Reserves: Operating System Support for Multimedia Applications

3. Quality of Service

Real-Time Architectures 2003/2004. Resource Reservation. Description. Resource reservation. Reinder J. Bril

March 6, 2000 Applications that process and/or transfer Continuous Media (audio and video) streams become

A Rate-Based Execution Abstraction For Multimedia Computing*

A Modified Maximum Urgency First Scheduling Algorithm for Real-Time Tasks

Multiprocessor and Real-Time Scheduling. Chapter 10

Multimedia Systems 2011/2012

Periodic Thread A. Deadline Handling Thread. Periodic Thread B. Periodic Thread C. Rate Change. Deadline Notification Port

Temporal Protection in Real-Time Operating Systems. Abstract

15: OS Scheduling and Buffering

Temporal Protection in Real-Time Operating Systems. Abstract

Multiprocessor and Real- Time Scheduling. Chapter 10

A Dynamic Quality of Service Middleware Agent for Mediating Application Resource Usage

Real-Time Scheduling of Sensor-Based Control Systems

SCHEDULING REAL-TIME MESSAGES IN PACKET-SWITCHED NETWORKS IAN RAMSAY PHILP. B.S., University of North Carolina at Chapel Hill, 1988

Control Challenges in Multi-level Adaptive Video Streaming

What is the role of teletraffic engineering in broadband networks? *

Frank Miller, George Apostolopoulos, and Satish Tripathi. University of Maryland. College Park, MD ffwmiller, georgeap,

Multi-Epoch Scheduling Within the Real-Time Execution Performance Agent Framework

Worst-Case Timing Analysis of Cycle-Stealing DMA I/O Tasks. Tai-Yi Huang and Jane W.-S. Liu W. Springeld Ave.

Operating System Review Part

Using IDA for Performance Improvement in Multimedia Servers. Antonio Puliato, Salvatore Riccobene, Lorenzo Vita

T H. Runable. Request. Priority Inversion. Exit. Runable. Request. Reply. For T L. For T. Reply. Exit. Request. Runable. Exit. Runable. Reply.

Real Time Operating Systems and Middleware

OPERATING SYSTEMS. Systems with Multi-programming. CS 3502 Spring Chapter 4

Using the Imprecise-Computation Technique for Congestion. Control on a Real-Time Trac Switching Element

Dynamic Voltage Scaling of Periodic and Aperiodic Tasks in Priority-Driven Systems Λ

Integrating Multimedia Applications in Hard Real-Time Systems

Node Application Logic. SCI Interface. Output FIFO. Input FIFO. Bypass FIFO M U X. Output Link. Input Link. Address Decoder

Extensions to RTP to support Mobile Networking: Brown, Singh 2 within the cell. In our proposed architecture [3], we add a third level to this hierarc

Microkernel/OS and Real-Time Scheduling

Analyzing Real-Time Systems

Department of Computer Science Institute for System Architecture, Operating Systems Group REAL-TIME MICHAEL ROITZSCH OVERVIEW

Processor Capacity Reserves for Multimedia Operating Systems

DISTRIBUTED REAL-TIME SYSTEMS

A Comparative Study of the Realization of Rate-Based Computing Services in General Purpose Operating Systems

Fixed-Priority Multiprocessor Scheduling. Real-time Systems. N periodic tasks (of different rates/periods) i Ji C J. 2 i. ij 3

Workload Characterization Model for Tasks with Variable Execution Demand

Introduction to Real-Time Systems ECE 397-1

Improved Videotransmission over Lossy. Channels using Parallelization. Dept. of Computer Science, University of Bonn, Germany.

Subject Name: OPERATING SYSTEMS. Subject Code: 10EC65. Prepared By: Kala H S and Remya R. Department: ECE. Date:

A System Software Structure for Distributed Multimedia Systems

Quality of Service (QoS)

9. D. Tse, R. Gallager, and J. Tsitsiklis. Statistical multiplexing of multiple timescale

Maximizing the Number of Users in an Interactive Video-on-Demand System

Uniprocessor Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Three level scheduling

Embedded Systems: OS. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Module 20: Multi-core Computing Multi-processor Scheduling Lecture 39: Multi-processor Scheduling. The Lecture Contains: User Control.

Faculty of Computer Science Institute of Systems Architecture, Operating Systems Group. vs. REAL-TIME SYSTEMS MICHAEL ROITZSCH

Lecture Topics. Announcements. Today: Advanced Scheduling (Stallings, chapter ) Next: Deadlock (Stallings, chapter

Probabilistic Worst-Case Response-Time Analysis for the Controller Area Network

Learning Outcomes. Scheduling. Is scheduling important? What is Scheduling? Application Behaviour. Is scheduling important?

Event-Driven Scheduling. (closely following Jane Liu s Book)

THE DELAY COMPOSITION THEOREM ON PIPELINE SYSTEMS WITH NON-PREEMPTIVE PRIORITY VARYING SCHEDULING ALGORITHMS YI LU THESIS

Lecture 5 / Chapter 6 (CPU Scheduling) Basic Concepts. Scheduling Criteria Scheduling Algorithms

Real-Time Scalability of Nested Spin Locks. Hiroaki Takada and Ken Sakamura. Faculty of Science, University of Tokyo

Network-Adaptive Video Coding and Transmission

Resource Manager for Non-preemptive Heterogeneous Multiprocessor System-on-chip

A taxonomy of race. D. P. Helmbold, C. E. McDowell. September 28, University of California, Santa Cruz. Santa Cruz, CA

Simulation of Priority Driven Algorithms to Schedule Real-Time Systems T.S.M.Priyanka a*, S.M.K.Chaitanya b

Embedded Systems: OS

Multimedia Operating System (2)

An Introduction to Real-Time Operating Systems: Scheduling Theory

REAL-TIME OVERVIEW SO FAR MICHAEL ROITZSCH. talked about in-kernel building blocks:

7. Multimedia Operating System. Contents. 7.3 Resource Management. 7.4 Process Management. 7.2 Real Time Systems. 7.5 Prototype Systems. 7.

Comparing Random Data Allocation and Data Striping in Multimedia Servers

Computer Systems Assignment 4: Scheduling and I/O

Comparing Gang Scheduling with Dynamic Space Sharing on Symmetric Multiprocessors Using Automatic Self-Allocating Threads (ASAT)

Number of bits in the period of 100 ms. Number of bits in the period of 100 ms. Number of bits in the periods of 100 ms

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Performance Evaluation of Two New Disk Scheduling Algorithms. for Real-Time Systems. Department of Computer & Information Science

Analytical Modeling of Routing Algorithms in. Virtual Cut-Through Networks. Real-Time Computing Laboratory. Electrical Engineering & Computer Science

Rate-Controlled Static-Priority. Hui Zhang. Domenico Ferrari. hzhang, Computer Science Division

Copyright Notice. COMP9242 Advanced Operating Systems S2/2014 Week 9: Real-Time Systems. Real-Time System: Definition

ECE519 Advanced Operating Systems

Simulation of an ATM{FDDI Gateway. Milind M. Buddhikot Sanjay Kapoor Gurudatta M. Parulkar

Homework index. Processing resource description. Goals for lecture. Communication resource description. Graph extensions. Problem definition

LECTURE 3:CPU SCHEDULING

An Evaluation of Information Retrieval Accuracy. with Simulated OCR Output. K. Taghva z, and J. Borsack z. University of Massachusetts, Amherst

Last Class: Processes

Real-Time Mixed-Criticality Wormhole Networks

Consistent Logical Checkpointing. Nitin H. Vaidya. Texas A&M University. Phone: Fax:

Lecture Outline. Bag of Tricks

TECHNICAL RESEARCH REPORT

Operating Systems ECE344. Ding Yuan

International Journal of Advanced Research in Computer Science and Software Engineering

perform well on paths including satellite links. It is important to verify how the two ATM data services perform on satellite links. TCP is the most p

Introduction to Embedded Systems

Integrating Real-Time Synchronization Schemes into Preemption Threshold Scheduling

Multimedia Data Synchronization Mechanisms in Integrated System : A Study

Transcription:

Multimedia Applications Require Adaptive CPU Scheduling Veronica Baiceanu, Crispin Cowan, Dylan McNamee, Calton Pu, and Jonathan Walpole Department of Computer Science and Engineering Oregon Graduate Institute of Science and Technology Portland, Oregon, USA fsynthetix-requestg@cse.ogi.edu November 20, 1996 Abstract CPU scheduling and admission testing for multimedia applications have been extensively studied, and various solutions have been proposed using assorted simplifying assumptions. However, we believe that the complexity and dynamic behavior of multimedia applications and systems make static solutions hard to apply in real-world situations. We are analyzing the diculties that arise when applying the rate-monotonic (RM) scheduling algorithm and the corresponding admission tests for CPU management, in the context of real multimedia applications running on real systems. RM requires statically predictable, periodic workloads, and while multimedia applications appear to be periodic, in practice they exhibit numerous variabilities in workload. Our study suggests the need for more adaptive scheduling mechanisms, which would allow complex applications to dynamically respond to variations in workload and resource availability. Furthermore, we believe there is a need for a more abstract characterization of applications and resources for admission testing purposes. We conclude that adaptive CPU scheduling policies should address the needs of CPU scheduling and reservation for current multimedia applications. 1 Introduction Rate-monotonic (RM) scheduling [5, 6] and its corresponding admission tests are widely used techniques in CPU management for multi-media applications [7, 9]. However, implementing RM and admission testing in real systems is problematic due to insucient operating system support and the inherent diculty of characterizing variable media and complex applications. RM scheduling provides real-time guarantees provided that tasks are perfectly periodic, independent of each other, have constant computation times, and that the OS is preemptive. We have found that these requirements are dicult to meet, particularly the requirement to accurately characterize the application's workload. Relaxing some of these conditions alleviates some of the problems, but the application This project is supported in part by grants from DARPA and the National Science Foundation, and donations from Tektronix, Hewlett-Packard and the Portland Trail Blazers. 1

is still hard to characterize, and the resultant performance achieved by the system will be below its capacity. Our study considers the client side of a multiple stream distributed Internet MPEG player [2, 3, 4], running on a Unix system, and allowing interactive user specication of desired QoS (resolution, frame rate, window size). We believe that this type of multimedia application and environment encompasses present and future multimedia systems, and thus the problems we have identied are characteristic to general multimedia environments. A prominent strategy for performing resource management formultimedia systems is QoSdriven management, in which quality requirements such as resolution and frame rate are translated into resource requirements such as computation burst frequencies and durations. This resource information is then used for admission testing and resource reservation. The motivation for this translation from application level requirements to resource requirements is to enable admission testing for a certain QoS. However, there are several diculties with this approach. We have discovered that the highly dynamic and complex nature of multimedia systems makes accurate static prediction of the behavior of the system dicult. Our experience indicates the need for more adaptive mechanisms that can react to changes in the resource needs of multimedia applications to ensure that they get the resources necessary to provide the requested QoS, and that they do not consume excess resources. Such mechanisms allow a less precise characterization of applications and systems, and more relaxed, higher level admission tests, providing higher resource utilization. While we consider only RM scheduling, we believe that the problems identied are common to all static CPU management strategies that try to statically characterize a given multimedia system, and attempt to reserve resources based on this static analysis. This paper is structured as follows: Section 2 describes the environment where we have studied the applicability ofrmscheduling and admission testing to multimedia systems. Section 3 outlines the multiple diculties we have noticed when trying to apply RM scheduling and static admission test to our multimedia system. Finally, Section 4 describes our conclusions and suggests some future directions in multimedia resource management. 2 Rate-Monotonic Scheduling and Multimedia System We have assessed the applicability of the RM scheduling algorithm and admission testing in realworld systems by considering the case of our MPEG player [2, 3, 4]. To make our study possible, we have created a simplied model of our player, as represented in gure 1. The relevant processes are the decoding process and the display process. Buf 1 holds frames assembled from network packets. The decoding process reads compressed frames from Buf 1, placing the decoded frames in Buf 2, which are subsequently displayed by the display process. Our study simulates such streams by implementing tasks with CPU service times derived from the real computation times of the decoder and display processes in the player, and service frequencies 2

Network Buf 1 Buf 2 Decoder Process Display Process Figure 1: Simplied Architecture of One Stream at MPEG Player Client Site corresponding to typical video frame rates. We then execute the the simulated tasks on a real system and measure their behavior. We approximate RM scheduling by assigning priorities to tasks according to their periods, using Unix real-time (non-aging) priorities. We use Lehoczky et al's exact admission test [5]. We did not study relaxed deadline constraints for the decoding process, even though buering allowed it: we just assigned the same frame rates to both the decoder and display processes. We consider a stream to have missed its deadline if either its decoder or display processes misses a deadline. This simplies analysis, but is a pessimistic assumption due to buering. Variable decode times for MPEG frame types is also not modeled rather the tasks have workloads corresponding to the average decode times in the player for three dierent resolutions. 3 Problems Encountered with RM We encountered several problems in applying RM scheduling to guarantee Multimedia QoS. Sections 3.1 through 3.3 explain how multimedia applications fail to meet RM's preconditions, and so we made simplifying assumptions about the application. Despite these simplifying assumptions, our scheduling discipline is still only an approximation to RM, as explained in Section 3.4. Thus our attempt to use RM scheduling and admission testing highlights the diculty in applying RM to real multimedia systems. This section describes these problems in detail, along with other features that complicate system characterization and management using RM. 3.1 Complexity of Multimedia Application Architectures We have only considered a single, simplied pipeline from our multimedia player. Our prototype MPEG player supports multiple video pipelines, possibly synchronized with each other, and with one or multiple audio pipelines [4]. The process structure is also simplied { in a real player, the display process might be broken into two dierent processes, one for dithering and image scaling, and another one for rendering the image on the display [4]. A \buering" process should also be considered, which would assemble packets arriving over the network into frames, and store them into Buf 1. Buer disposition and buer sizes could also vary depending on design preferences [4]. Controller processes might synchronize some of the streams or perform other functions. 3

Thus, the overall application architecture can be quite complex and dynamic. Analyzing the behavior of tasks in this context is dicult, because it is likely that many tasks do not conform to the periodic model, and may exhibit critical dependencies. Even ignoring synchronization among streams, tasks within a pipeline clearly depend on each other's results. While deeper analysis could allow admission testing of inter-dependent tasks, a static analysis would result in over-reserving resources. Furthermore, the characterization of the tasks (which is required for RM to work) will change with each platform, depending on local CPU speed and memory availability, virtually eliminating device independence in the multimedia application. 3.2 Variation in Multimedia Data Streams Our player delivers MPEG compressed data across the Internet. The three kinds of MPEG encoded frames (I, P, B) vary signicantly in size and also in necessary software decoding time. Even for frames of the same type, image content causes signicant irregularity in frame size. There are numerous admission testing issues related to the irregularity of MPEG decoding times. A pessimistic admission tester will consider the worst-case decode time for all the frames. However, this will signicantly over-reserve the CPU. Rather, the period for the decoding process should be relaxed in proportion to the amount of buer space between the decoding and the displaying processes, and before the decoding process. However, this implies knowing the exact amount of buering that would compensate for a certain variation in frame decoding time. The variation itself is hard to determine, because it depends on image content, MPEG encoding parameters, and variation in the client's CPU speed. 3.3 Complexity of Resource Interplay We have found that CPU management cannot be isolated from memory and network management. Network burstiness can result in unpredictable variation of CPU workload, so static CPU management strategies could not guarantee performance. Buering relaxes the deadline constraints of the tasks, and compensates for the variability in task computation times and task arrival times. Thus admission testing without considering buering eects will dramatically over-reserve thecpu. In fact, buering and CPU management caninteract in surprising ways. For instance, if there are multiple concurrent pipelines such as in Figure 1, the RM disciple of giving a higher priority to processes with higher frame rate will result in decoder processes running continually until they blocks on Buf 1 empty or Buf 2 full. This will starve alower priority pipeline, unless the amount of buering for that pipeline is suciently larger than the one in the higher priority pipeline. 1 Thus, buering for some streams can result in degrading the performance of other streams. Whether a more complex buer management strategy is appropriate or not, this example clearly shows that CPU management cannot ignore buer management. 1 Assuming that processes in both pipelines have the same CPU service times. 4

3.4 Insucient Operating System Support for Multimedia Our previous work [1] analyzed the eects of various Unix features on RM scheduling and admission testing. We used the simulation of player streams described in Section 2, and assigned priorities to tasks according to their periods to approximate RM on top of Unix. Implementing RM on top of Unix introduces imprecision in the scheduling mechanism, as RM (in its original form) requires preemptive scheduling, while on Unix preemption is not possible at granularity lower than timeslice length (usually 10 ms). Additional imprecision is introduced through context switch overhead, timer interrupt imprecision, non-preemptability in system calls and during I/O blocks. We used Lehoczky's RM admission test [5], which assumes perfect preemptability of tasks. In this sense, our test is optimistic: Some of the tasks it accepted should have been rejected, even ignoring the inuence of non-real-time Unix characteristics. Note that we could have used an admission test that would not have required perfectly preemptable tasks. For instance, we could have used the more restrictive admission test described by Nagarajan and Vogt [8] for nonpreemptable tasks, but this would over-reserve the CPU, and complicate analysis. Our study showed that the Unix features that generate imprecision for our RM scheduling mechanism and admission test does not generally cause signicant performance degradation compared to RM applied in ideal conditions [1]. However, when the CPU utilization factor is close to 100%, this slight imprecision can lead to catastrophic degradation of quality for the stream with the lowest priority in the system. Thus, the imprecision introduced by the operating system contributes to the overall unpredictable behavior of multimedia systems. 3.5 Potentially Frequent User Demand for QoS Changes Multimedia applications should allow users to interactively specify QoS requirements in dierent dimensions. Our MPEG player currently allows users to specify the desired frame rate or resolution for any of its multiple streams, and to modify the window size by simply stretching the window as the video plays [4]. This kind of interface suggests a potentially frequent demand for admission testing, together with the need of translating each of the \points" in this QoS space into corresponding requirements in the resource space. The complexity of both the QoS space and the resource space suggests that perfect characterization is hard to achieve, so it would be desirable to have an adaptive mechanism that would obviate accurate characterization. The same adaptive mechanism could then detect and adapt to changes in user QoS requirements. 4 Conclusions Our study of RM applied to multimedia systems has highlighted the diculty of this approach. While our analysis concentrates on the CPU resource, and the RM mechanism in particular, we 5

believe that these problems are inherent toallmechanisms that attempt to statically characterize multimedia systems, and to manage future resources based on this characterization. Rather than propose enhancements to RM or other static mechanisms for scheduling and admission testing, we believe that the problems we have encountered demonstrate a need for more adaptive mechanisms, possibly derived from the mechanisms that perform static resource management, and that consider the interplay among heterogeneous resources in the system. Such mechanisms should independently strive toachieve the desired QoS, in an environment with variable resources, as well as complex and variable application demands. These mechanisms need to be applicable with only approximate knowledge of the application and of the resources available. Such a facility would enable admission testing with only with an abstract characterization of resource demand and resource availability. References [1] Veronica Baiceanu. CPU Management for UNIX-based MPEG Video Applications. Available at http://www.cse.ogi.edu/ baiceanu/papers/, 1996. [2] Shanwei Cen, Calton Pu, Richard Staehli, Crispin Cowan, and Jonathan Walpole. A Distributed Real-Time MPEG Video Audio Player. In Proceedings of the 1995 International Workshop on Network and Operating System Support for Digital Audio and Video (NOSSDAV'95), pages 151{162, New Hampshire, April 1995. [3] Crispin Cowan, Shanwei Cen, Jonathan Walpole, and Calton Pu. Adaptive Methods for Distributed Video Presentation. ACM Computing Surveys, 27(4):580{583, December 1995. Symposium on Multimedia. [4] Rainer Koster. Design of a Multimedia Player with Advanced QoS Control. Master's thesis, Oregon Graduate Institute of Science & Technology, 1997. [5] J. Lehoczky, L. Sha, and Y. Ding. The rate monotonic scheduling algorithm: exact characterization and average case behavior. In Proc. IEEE 10th Real-Time Systems Symp., pages 166{171, December 1989. [6] C. L. Liu and J. W. Layland. Scheduling algorithms for multiprogramming in a hard real-time environment. J. ACM, 20(1):46{61, January 1973. [7] C. W. Mercer, S. Savage, and H. Tokuda. Processor Capacity Reserves: Operating System Support for Multimedia Applications. In Proc. of the International Conference on Multimedia Computing and Systems, pages 90{99, May 1994. [8] R. Nagarajan and C. Vogt. Performance of Multimedia Trac over the Token Ring. Tech. report, IBM-ENC, Heidelberg, 1992. [9] K.K. Ramakrishnan, Lev Vaitzblit, Cary Gray, Uresh Vahalia, Dennis Ting, Percy Tzelnic, Steve Glaser, and Wayne Duso. Operating Systems Support for a Video-On-Demand File Service. In Proceedings of the 1993 International Workshop on Network and Operating Systems Support for Digital Audio and Video (NOSSDAV'93), pages 225{236, Lancaster, U.K., November 1993. 6