scheduling multimedia applications with quality of ...

1 downloads 0 Views 200KB Size Report
beginning of a multimedia service when time constraints are loose. The fact that, pij and qi (i=1...n, .... [5] C.W. Mercer, S. Savage, and H. Tokuda, “Processor.
1. A.G. Malamos, T.A. Varvarigou and E.N. Malamas, «Scheduling Multimedia Applications With Quality Of Service Requirements to Multiprocessor Systems,» 7th IASTED Int. Conf. On Applied Informatics (AI 99), Austria, Feb. 1999.

SCHEDULING MULTIMEDIA APPLICATIONS WITH QUALITY OF SERVICE REQUIREMENTS TO MULTIPROCESSOR SYSTEMS A. G. MALAMOS Dept. of Electronics and Computer Eng. Technical University of Crete

T. A. VARVARIGOU Dept. of Electrical and Computer Eng. National Technical University of Athens

Abstract— The continuous growth of use of multimedia information, combined with the workload and the requirements of these applications, give rise to the need for developing multimedia oriented multiprocessor scheduling schemes. Thus, efficient models and must be formulated, suitable enough for scheduling multimedia applications in multiprocessor end-systems (servers, workstations, set-top-boxes). However, multimedia applications, unlike other real time applications, have quality requirements. This introduces Quality of Service (QoS), as a new criterion in the multiprocessor scheduling. In this paper we introduce a framework to schedule multiple, concurrently arrived requests for multimedia services, on a general-purpose multiprocessor system. The framework provides a model suitable to formulate QoS application requirements and multimedia characteristics into well known scheduling parameters, such as period, computation time, weights, etc. Furthermore the framework includes a linear optimization algorithm which is able to optimally assign tasks to processors in order to maximize the overall Quality of Service of the multimedia applications and to prevent processors from over-loading. (Keywords: parallel systems, multimedia applications, Quality of Service (QoS), scheduling algorithm)

I. INTRODUCTION Multimedia applications and services have imposed new requirements in the design of systems that support them. Multimedia applications and particularly continuous media presentation applications (e.g. video on demand, teleconferencing etc.) are real time applications that demand from the processing systems (servers, workstations, set-top-boxes) to handle effectively, large amounts of information in a timely fashion. Thus, processing machines, scheduling algorithms and operating systems have adapted to the requirements of multimedia information [1]-[9]. Multimedia applications are created from the compo-

E.N. MALAMAS Dept. of Electronics and Computer Eng. Technical University of Crete

sition of various types of information and media (e.g. video, audio, 3D animation, etc.). These types of information are, in general, format and processing independent. Thus, each one of them can be processed individually and the only restriction is to be ready in time, so that to fulfill synchronization demands. Furthermore, each media involved in an application consists of granules of information, such as pixels, audio samples and etc., where most of them are produced by the digitization of analog signals. This granularity is in favor of parallelism. Multimedia applications, unlike other real time applications, have quality requirements. This implies that when user requests for a multimedia service, he/she must be provided with a service, which will be constantly within his expectations of quality. Quality of Service (QoS) that a user experiences is related to the characteristics of the multimedia information that the processing system provides. Such characteristics might be frame rate and resolution for video information, or volume and sampling rate for audio information. However, user’s perception of quality is more related to his/her overall satisfaction of the service, than to the performance of some individual parts or pieces of information of the service. In this paper we introduce a framework to schedule multiple concurrently arrived requests for multimedia services, in a general-purpose multiprocessor system. The framework provides a model suitable to formulate QoS application and user requirements and multimedia characteristics into well-known scheduling parameters, such as period, computation time, weights, etc. Furthermore the framework includes a linear programming algorithm which is able to optimally assign tasks to processors in order to maximize the overall Quality of Service of the multimedia applications and to prevent processors from over-loading. The framework employs one of the most common scheduling algorithms, the Earliest Deadline First (EDF)[10]. With slight modifications, the proposed framework can be adapted to meet specifications of various multiprocessor architectures that support pipelining or thread and instruction level parallelism.

1. A.G. Malamos, T.A. Varvarigou and E.N. Malamas, «Scheduling Multimedia Applications With Quality Of Service Requirements to Multiprocessor Systems,» 7th IASTED Int. Conf. On Applied Informatics (AI 99), Austria, Feb. 1999. . TABLE I. Specifications of digital media. Type High Definition TV (HDTV) quality video NTSC quality video

CD quality Audio

voice quality Audio

II. MOTIVATION The expected growth in the use of multiprocessors to end-systems (servers, workstations, set-top-boxes), arises the necessity of developing multimedia oriented multiprocessor scheduling schemes. Thus, efficient models and algorithms for transformation of parameters must be formulated, suitable enough for scheduling multimedia applications in multiprocessor systems. The models must relate multimedia application quality characteristics, which are easy for a user to understand, to scheduling parameters of the processing system. This relation between parameters makes the system transparent to the user and allows him to express his requirements directly to the scheduling framework. The scheduling algorithm must preserve timing constraints of the applications and to provide quality guarantees to the user, by preventing over-utilization of the processors.

III. BACKGROUND A. MULTIMEDIA APPLICATIONS AND SCHEDULING Classes of Multimedia information When we refer to multimedia information, we mean types of data and processes (video, audio, text, control signals) that a multimedia application may use in order to provide a service. A scheduler that supports effectively multimedia applications has to manage efficiently all types of information, supporting QoS with respect to the user as well as application and information demands and preferences. In the sense of timing requirements, multimedia information may be distinguished into three major classes. a) Continues Media (CM) (video, audio, animation data etc.) b) aperiodic information with real time

Best Quality Specifications 2000X1024 pixels/Frame 60 frames/sec 24 bits/pixel 640X480 pixels/Frame 25 Frames/sec 8 bits/pixel stereo (2 channels) 44100 samples/sec per channel 16 bit/sample mono (1 channel) 8000 samples/sec 8 bit/sample

constraints (photos, graphics, text, etc.) and c) aperiodic information without real time constraints (e-mail, ftp, etc.). QoS characteristics QoS characteristics are performance characteristics that specify technical requirements related to the application, the infrastructure (end-system, network) and the user’s demands. These characteristics tune the level of quality provided by the whole system. Quality of service characteristics [11][12][13] may be distinguished into following classes: a) performance oriented characteristics (throughput, bandwidth, delay, jitter), b) format oriented characteristics (video resolution, compression format, frame rate) and c) synchronization oriented characteristics (delay tolerance or precedence constraints). QoS characteristics and scheduling In the case of scheduling, QoS characteristics must be translated into classical scheduling parameters such as computation time, period, deadline and priorities. This translation is a difficult issue, due to the complicated relationship between the user, the application and the media requirements of quality. In the rest of this section we provide a general description of the relationship between QoS and scheduling parameters. Computation time of a task that corresponds to a piece of multimedia information is related to format oriented characteristics such as, video resolution, compression format and processing that is required to enhance (color adjustment, filtering, etc.) and deliver the information. Timing constraints, such as period and deadline, are closely related to QoS format characteristics like frame rate or synchronization characteristics. Importance, weights and priorities among tasks, are related to priorities among applications and moreover, to priorities of individual types of information in the same application.

1. A.G. Malamos, T.A. Varvarigou and E.N. Malamas, «Scheduling Multimedia Applications With Quality Of Service Requirements to Multiprocessor Systems,» 7th IASTED Int. Conf. On Applied Informatics (AI 99), Austria, Feb. 1999.

B. EARLIEST DEADLINE FIRST (EDF) SCHEDULING ALGORITHM One of the most popular real-time scheduling algorithms is the Earliest Deadline First (EDF). This algorithm has proved to be optimal, among all single processor scheduling algorithms, in the sense that if a set of tasks can be scheduled by any algorithm, it can be scheduled by the EDF algorithm [10]. When EDF algorithm is used, then processor admission control is based on inequality (1), which is the schedulability condition 1 of EDF introduced by Liu and Leyland in [10]. Where C i (computation time) is the time that is necessary for the processor to execute the i-th task, Ti is the period of the task and n is the number of tasks. n C (1) U EDF   i 1 i 1Ti Note that UEDF expresses the processor utilization 2 in the case of EDF algorithm. EDF algorithm may achieve full utilization (UEDF=1).

IV. QoS MODEL FOR SCHEDULING PARAMETERS In this section we introduce a model that relates fundamental scheduling and technical parameters to application QoS characteristics. Later, we will use these parameters to formulate a linear programming algorithm, suitable for assigning tasks of multimedia applications to multiprocessor systems. A. DEFINITION OF QUALITY OF A MULTIMEDIA SERVICE. Every network application has an upper limit on quality that is able to provide. This upper limit on quality is independent of the network or other temporal characteristics of the communication infrastructure and depends on the service and the service provider. When a user asks for quality, he asks for a portion of the best quality that the system supports. In this model, when we refer to quality (q) of a service (or application), we mean a real in [0,1] interval, which expresses a fraction of the optimal quality that the application and the provider may provide. When quality (q) is equal to one, then the user experiences the maximum quality that the service can provide. On the other hand, when quality (q) is forced to zero, the 1

Schedulability condition checks whether scheduling a set of tasks with an algorithm is feasible. 2 Processor utilization is the fraction of processor time spent in the execution of the task set.

user does not get any service at all. The relation between quality and application characteristics (e.g. resolution, frame rate, etc.) depends on the application and the provider. B. COMPUTATION RATE AND QoS. It is obvious from (1), (2) that, what is really interesting about the task parameters in the case of scheduling, is the rate of computation time (C) and period (or deadline) (T). Computation time and period (or deadline) of a multimedia information task are both related to QoS. Computation time is the processing time of a frame (e.g. number of pixels processing time per pixel). Thus, computation time is proportional to quality. On the other hand, period of a video service is related to frame rate of the video information. Period is inversely proportional to quality of the service. In this model we express computation rate, instead of computation time and period individually, as a function of QoS. We assume linear relation (2) to model the association between computation rate and QoS. In (2) qi is the quality of i-th service and aij is a constant that specifies the maximum rate (q i=1, best quality) of the i-th service in the j-th processor: C ij (q i ) R ij (q i )  a ij  q i . (2) Ti (q i ) C. WEIGHTS AND QoS. All the media involved in a multimedia application and moreover all the applications are not of the same importance. QoS in multimedia applications is related to the subjective conception of user satisfaction. Thus, considering user and application requirements, scheduling of multimedia applications has to embed mechanisms that support importance gradation, among services. Weights are scaling the influence of multimedia services on the overall quality. Furthermore, in a priced service environment, weights may be used to introduce the pricing policy of the application provider to the scheduling framework.

V. FORMULATION OF THE PROBLEM Assume a multiprocessor system with m processors P j (j=1..m). The processors use EDF to schedule tasks. Assume that in this system a set of n periodic real time multimedia tasks i (i=1..n) arrives. A multimedia task is denoted by i=(ai1,ai2,...,aim), and is assigned the weight wi, where, i is the set of the maximum rates of the task in the m processors and wi is the importance of the task. The workload of a task may be distributed into more than one processors (multiprocessor tasks). The portion of a task

1. A.G. Malamos, T.A. Varvarigou and E.N. Malamas, «Scheduling Multimedia Applications With Quality Of Service Requirements to Multiprocessor Systems,» 7th IASTED Int. Conf. On Applied Informatics (AI 99), Austria, Feb. 1999.

(i) that is assigned to a processor (P j) is denoted by pij. Thus, there is a set i=(pi1, pi2,..,pim) for every task (i), which is the assignment of portions of the task to the processors. Every processor (P j) may process one task (i) or one piece (pij) of a task at a time. We seek to find the optimal quality levels (q1, q2,..,qn) of multimedia tasks and the optimal assignment of tasks to processors (1, 2,...,n), so that, under EDF algorithm, no multimedia task will violate any period and to maximize the weighted overall quality (3) that the system provides: n (3) Q   wi  q i . i 1 The stated problem can be formulated as an optimization problem, thus we have to solve the following problem. n maximize Q   wi  q i (4) i 1 subject to n Uj (EDF )   pij  Ri  i 1 (a) (5) n  aij  pij  qi 1, j 1...m i 1 m (b)  p ij 1, i 1...n (6) j 1 (c) 0 q i 1, i 1...n

(7)

In general, optimization is a task of high computation complexity. However, in the case of linear equations with real variables, due to Simplex algorithm [14], solutions can be achieved in acceptable time. Moreover, the idea of optimization process is made more realistic, if one considers that task assignment takes place only once, in the beginning of a multimedia service when time constraints are loose. The fact that, pij and qi (i=1...n, j=1...m) are both unknown variables, makes this problem a non-linear optimization problem. However, a suitable variable transformation may formulate the problem as a linear optimization one. Formulation of the problem as linear optimization. Assume variable Xij such that: Xij  p ij  q i (8) Transformation (8), leads to the following relations: m (9)  Xij  q i , i 1...n j 1

p ij 

Xij qi

(10)

From (7) and (9),

m (11) 0  Xij 1 j 1 Thus the optimization problem (4)-(7) is reformulated to: n m maximize Q    wi  Xij (12) i 1j 1 subject to n (a) U j (EDF )   a ij  Xij 1, j 1...m (13) i 1 m (b) 0  Xij 1, i 1...n (14) j 1 The problem stated by (12)-(14) is a linear optimization problem. Thus, solutions can be achieved by using the Simplex algorithm. Since solutions Xij can be computed, then variables p ij and qi (i=1..n, j=1..m) may be reproduced by equations (9) and (10). Adaptation of the solution to the granularity of the multimedia task. Due to the granularity of the workload of an application, the portions pij of a task that are assigned to processors through the optimization process, correspond to a portion of the total amount of granules (ex. pixels for a video frame) of the task. Consequently, p ij can be specified us: g ij (15) p ij  Gi where gij is the amount of granules of task (i) that is assigned to processor (Pj) and Gi is the total amount of granules of the task. Since, gij and Gi are integers then pij is valid only if it is integer multiple of (1/Gi). Very often the portions pij that is computed through the optimization, correspond to [g ij ] g ij p ij  , 0 g ij 1 , (16) Gi where gij, is a portion of one granule of i-th task that is assigned to j-th processor. However, a granule is assumed to be undivided and therefore gij has no physical basis. Thus the processor has to execute either [gij]3 or [gij]+1 granules. According to equations (5),(7),(15) and (16), the overhead in the computation rate that is imposed by the rounding up of the amount of granules gij, is equal to 3

Where [gij] denotes the integer part of gij.

1. A.G. Malamos, T.A. Varvarigou and E.N. Malamas, «Scheduling Multimedia Applications With Quality Of Service Requirements to Multiprocessor Systems,» 7th IASTED Int. Conf. On Applied Informatics (AI 99), Austria, Feb. 1999.





R ij  1 g ij 

a ij  q i , Gi

(17)

and the worst case overhead (when gij tends to zero and qi tends to one) is equal to a ij . (18) R ij  Gi In order to prevent processors from overloading imposed by the rounding up of the amount of granules, we appropriately reduce, in equations (13) and (16), the upper-limits of utilization. n n a ij U j (EDF )   a ij  Xij 1  , j 1...m (19) i 1 i 1G i As discussed above, distribution of workload of a task to processors is affected by the workload granularity of the task. Thus the computed (optimal) distribution of workload to processors is rounded, due to the granularity, to the closest number with physical meaning. Consequently, the implementation of the computed distribution to processors tends to optimal as the workload granularity of the task increases.

VI. CONCLUSIONS In this paper we introduced an applicable model that relates format characteristics of quality of multimedia services, to scheduling parameters of a multiprocessor system. We applied this model on the formulation of an assignment algorithm that distributes, in an optimal manner, the workload of concurrently arrived multimedia tasks to processors, with the objective to maximize the overall quality provided by the system. Scheduling of the tasks into processors was accomplished by Earliest Deadline First (EDF) algorithm. We performed extended simulations, where we included the most common types of video and audio services. The simulation results show that, the framework proposed in this paper, can handle effectively the admission of multiple concurrently arrived multimedia service requests.

REFERENCES [1] L.C. Wolf, W. Burke, and C. Vogt, “Evaluation of a CPU Scheduling Mechanism for Multimedia Systems,” Sofware-Practice and Experience, 26(4), 1996, 375-398. [2] D.K.Y. Yau and S.S. Lam, “Adaptive Rate-Controlled Scheduling for Multimedia Applications,” IEEE/ACM Trans. on Networking, 5(4), 1997, 475-488. [3] G. Coulson and G. Blair, “Architectural Principles and Techniques for Distributed Multimedia Application Support in Operating Systems,” Operating Systems review, 29(4), 1995, 17-24.

[4] S.T.C. Chou and H. Tokuda, “System Support for Dynamic QoS Control of Continuous Media Communications”, Network and Operating Systems Support for Digital Audio and Video, (ED. by P. Venkat Ranfan LNGS 712, Springer Verlag Berlin, pp. 363-368, 1993). [5] C.W. Mercer, S. Savage, and H. Tokuda, “Processor Capacity Reserves: Operating System Support for Multimedia Applications,” Proc. of the Inter. Conf. on Multimedia Computing and Systems, May 1994, 90-99. [6] K. Diefendorff and P.K. Dubey, “How Multimedia Workloads Will Change Processor Design,” IEEE Computer Mag., September 1997, 43-45,. [7] K. Balmer et al., “ A Single Chip Multimedia Video Processor,” proc. of the CICC, pp. 91-94, San Diego, May 1994. [8] R.B. Lee, “Accelerating Multimedia with Enhanced Microprocessors,” IEEE Micro, April 1995, 22-32. [10] C.L. Liu and J.W. Layland, “Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment,” J. of the Ass. for Computing Machinery, 20(1), 1973, 46-61. [11] A. Vogel, B. Kerhervé, G. v. Bochmann and J. Gecsei, “Distributed Multimedia Applications and Quality of Service- A Survey,” IEEE Multimedia, 2(2), 1995, 10-19. [12] G.v. Bochmann and A. Hafid, “Some principles for quality of service management”, Distributed Systems Engineering Journal , 4(1), 1997, 16-27. [13] C. Aurrecoechea, A.T. Campbell, and L. Hauw, “A Survey of Quality of Service Architectures,” Multimedia Systems Journal Special Issue on QoS Architecture, May 1998. [14] C.H. Papadimitriou and K. Steiglitz, “Combinatorial Optimization-Algorithms and Complexity,” (ED. Prentice-Hall 1982).

Suggest Documents