Document not found! Please try again

Integrated Dynamic Scheduling of Hard and QoS ... - Semantic Scholar

5 downloads 6367 Views 249KB Size Report
algorithms can be adapted for integrated scheduling of multimedia streams and hard .... scheduler has to ensure that the dispatch queues always have a minimum ...... relations," IEEE Trans. on Software Engg., vol.16, no.3, pp.360-369, Mar.
Integrated Dynamic Scheduling of Hard and QoS Degradable Real-Time Tasks in Multiprocessor Systems Anita Mittal G. Manimaran C. Siva Ram Murthy Department of Computer Science and Engineering Indian Institute of Technology Madras 600 036, INDIA Email: [email protected] [email protected] [email protected]

Abstract

Many time-critical applications require predictable performance and tasks in these applications have deadlines to be met. For tasks with hard deadlines, a deadline miss can be catastrophic while for QoS degradable tasks (soft real-time tasks) timely approximate results of poorer quality or occasional deadline misses are acceptable. Imprecise computation and (m,k)- rm guarantee are two workload models that quantify the trade-o between schedulability and result quality. In this paper, we propose dynamic scheduling algorithms for integrated scheduling of real-time tasks, represented by these workload models, in multiprocessor systems. The algorithms aim at improving the schedulability of tasks by exploiting the properties of these models in QoS degradation. We also show how the proposed algorithms can be adapted for integrated scheduling of multimedia streams and hard real-time tasks, and demonstrate their e ectiveness in quantifying QoS degradation. Through simulation, we evaluate the performance of these algorithms using the metrics - success ratio (measure of schedulability) and quality. Our simulation results show that one of the proposed algorithms, multilevel degradation algorithm, outperforms the others in terms of both the performance metrics. Index Terms: Multiprocessor, Real-time system, Dynamic scheduling, QoS degradation.

1 Introduction Real-time systems are de ned as those in which the correctness of the system depends not only on the logical result of computation, but also on the time at which the results are produced [1]. The realtime processes impose explicit timing constraints on the individual tasks which must be met in order to ensure the correctness and safety of real-time systems. For some tasks, a deadline miss can lead 1

to catastrophe, while for some other tasks timely approximate results of poorer quality or occasional deadline misses can be tolerated. Tasks in the former category are hard real-time tasks while tasks in the latter category are soft real-time (QoS degradable) tasks. Multimedia information, which has soft real-time constraints, is being increasingly used in real-time applications. Because of the wide range of applications having tasks of the hard and soft deadline category, it is only natural to look at the possibility of a common platform that supports both hard and soft real-time tasks. In our work, Quality of Service (QoS), associated with each task speci es the level of satisfaction that the job expects and essentially di erentiates between a soft and hard task. Multiprocessor systems have emerged as a powerful computing means for real-time applications like air trac control, image processing and tracking, industrial processor control because of their capability for high performance and reliability [2]. The problem of multiprocessor scheduling is to determine when and on which processor a given task is to be executed. Static algorithms [3, 4] are often used to schedule periodic tasks with hard deadlines. The main advantage is that, if a solution is found, then one can be sure that all deadlines will be met. Scheduling of aperiodic tasks whose characteristics are not known a priori requires dynamic scheduling algorithms. Complexity results show that real-time multiprocessing scheduling is NP-hard. It was shown in [5] that there does not exist an algorithm for optimally scheduling dynamically arriving tasks, with or without mutual exclusion constraints, on a multiprocessor system. A heuristic search algorithm, called myopic scheduling algorithm, was proposed in [6] for tasks with resource constraints. Imprecise computation [7] and the (m,k)- rm guarantee [8] are two workload models that provide scheduling exibility by compromising on result quality to meet computation deadlines. Imprecise computation technique prevents timing faults (deadline misses) and achieves graceful degradation by giving the user an approximate result of acceptable quality whenever the system cannot provide the exact result in time. Here, each time critical task, has a mandatory part and an optional part. This technique uses the strategy of executing the mandatory parts to completion before their deadlines, but may leave the less important (optional) parts un nished in order to conserve system resources. When the optional part of a task is skipped, the task produces an imprecise (i.e., approximate) result. Image processing and tracking are some applications where one may prefer timely imprecise results, to late precise results. It is often better to have frames of fuzzy images or estimates of target locations in time rather than perfect images of accurate location data too late [7]. In [9], a static scheduling algorithm has been proposed for scheduling of imprecise tasks in multiprocessor real-time systems. In the (m,k)- rm guarantee model, a periodic task with (m,k)- rm guarantee experiences dynamic failure if fewer than m task instances in a window of k task instances meet their deadlines. The result is of acceptable quality as long as at least m tasks in a window of k consecutive task instances meet 2

their deadlines [8]. The (m,k)- rm guarantee model is used to express the requirements of applications in which it is not necessary for every instance of the periodic task to meet its deadline. For example, in the real-time transmission of digitized full motion video it is preferable to drop a frame if the frame cannot be transmitted in time. One can tolerate a few deadline misses (i.e., dropped frames) if the missed frames are adequately separated by successful frames. Many hard real-time applications such as automated manufacturing and attack helicopters are being designed to take advantage of audio and video information. For example, in attack helicopters such as Comanche, audio and video sensors support monitoring and sophisticated control of the helicopter [10]. This requires exible and dynamic scheduling that includes various types of interactions between the hard real-time and multimedia tasks (soft deadline). While a number of scheduling algorithms have been proposed for supporting multimedia in conjunction with traditional non-real-time applications [11, 12, 13], not much work has been done in the area of integrated scheduling of multimedia and hard real-time tasks. In [10], an algorithm was proposed for scheduling of multimedia and hard real-time tasks using the multimedia server approach. A Quality of Service (QoS) degradation mechanism was proposed to increase the schedulability of hard real-time tasks by reducing the computation time of the multimedia tasks. However, quanti cation of QoS degradation was left as an open problem. The issue of how to guarantee the minimum quality requirement of the multimedia streams was also not dealt with. In this paper, we propose dynamic scheduling algorithms for integrated scheduling of hard and QoS degradable tasks in real-time multiprocessor systems. The algorithms di er in the policy they use for QoS degradation. While these policies can be incorporated in any dynamic scheduling algorithm, in this paper, we use the myopic algorithm for implementing these policies. The proposed algorithms aim at improving schedulability by compromising on result quality. Another objective of our work is to adapt the proposed scheduling algorithms for integrated scheduling of hard real-time tasks and multimedia streams. The minimum QoS requirement of multimedia streams is quanti ed using the (m,k)- rm guarantee model. The rest of the paper is organized as follows: The scheduler and the task models are presented in Section 2. Section 3 presents the integrated scheduling algorithms based on di erent QoS degradation schemes. Section 4 discusses the adaptation of the proposed algorithms for integrated scheduling of multimedia and hard real-time tasks. Section 5 presents the simulation results and Section 6 summarizes our work.

3

Min. length of dispatch queues

P1 New tasks

Task queue

P2

Scheduler

Current schedule

P3 Dispatch queues (Feasible schedule)

Processors

Figure 1: Parallel operation of scheduler and processors

2 Scheduler and Task Models 2.1 Scheduler Model In this paper, we will assume a centralized scheduling scheme. In a centralized scheme, all the tasks arrive at a central processor called the scheduler, from where they are distributed to other processors in the system for execution. The communication between the scheduler and the processors is through dispatch queues. Each processor has its own dispatch queue. This organization, shown in Figure 1, ensures that the processors will always nd some tasks in the dispatch queues when they nish the execution of their current tasks. The scheduler will be running in parallel with the processors, scheduling the newly arriving tasks, and periodically updating the dispatch queues. For this parallel operation the scheduler has to ensure that the dispatch queues always have a minimum number of tasks (if there are tasks left with it). This minimum number depends on the worst case time required by the scheduler to reschedule the tasks upon the arrival of a new task [14].

2.2 Task Model We assume that the real-time system consists of m processors, where m > 1. The dynamically arriving tasks can be either aperiodic tasks or aperiodically arriving periodic tasks. 1. Each aperiodic task Ti is characterized by its arrival time (ai ), ready time (ri ), mandatory time (mi ), computation time (ci ), and deadline time (di ). ci ? mi gives the optional time of the task. For the traditional hard real-time tasks, mi is equal to ci . 4

2. A periodic task Ti of the imprecise workload model is characterized by its arrival time (ai ), period (pi ), mandatory time (mi ), and computation time (ci ). The ready time (ri ) and deadline (di ) of task Ti is equal to the beginning and ending of its period, respectively. For the traditional hard real-time tasks, mi is equal to ci . 3. A periodic task Ti of the (m,k)- rm guarantee workload model is characterized by its arrival time (ai ), period (pi ), computation time (ci ), and the m and k parameters. The ready time (ri ) and deadline (di ) of task Ti is equal to the beginning and ending of its period, respectively. For the traditional hard real-time tasks, the value of m and k parameters is 1. 4. A task might need some resources such as data structures, variables, and communication bu ers for its execution. Every task can have two types of accesses to a resource: (a) exclusive access, in which case, no other task can use the resource with it or (b) shared access, in which case, it can share the resource with another task (the other task also should be willing to share the resource). Resource con ict exists between two tasks Ti and Tj if both of them require the same resource and one of the accesses is exclusive. 5. Tasks are non-preemptable.

2.3 Terminology De nition 1: A task is feasible if its timing and resource requirements are met in the schedule. A schedule is said to be a feasible schedule if all the tasks are feasible in the schedule. De nition 2: A partial schedule is a feasible schedule for a subset of tasks. A partial schedule is said to be strongly feasible if all the schedules obtained by extending the current schedule by any one if the remaining tasks are also feasible [6]. De nition 3: EATks (EATke ) is the earliest time when a resource Rk becomes available for shared (or exclusive) usage [6]. De nition 4: Let P be the set of processors, and Ri be the set of resources requested by task Ti . Earliest start time of a task Ti , denoted as EST (Ti ), is the earliest time when its execution can be started, de ned as: EST (Ti ) = MAX (ri ; MINjP (availtime(j )); MAXkR (EATku )), where avail time(j) denotes the earliest time at which the processor Pj becomes available for executing a task, and the third term denotes the maximum among the earliest available time of the resources requested by task Ti , in which u = s for shared mode and u = e for exclusive mode. i

5

3 The Integrated Task Scheduling Algorithms 3.1 Myopic Algorithm The proposed algorithms use the myopic algorithm [6]. The myopic algorithm is a heuristic search algorithm that schedules dynamically arriving real-time tasks with resource constraints. Starting at the root of the search tree which is an empty schedule the algorithm tries to extend the schedule (with one more task) by moving to one of the vertices at the next level in the search tree until a full feasible schedule is derived. To this end, a heuristic function H is applied to at most k tasks (known as the feasibility check window) that remain to be feasibly scheduled at each level of search. The task with the minimum value of function H is selected to extend the current partial schedule. If the current vertex is not strongly feasible, the algorithm backtracks to the previous search point and the schedule is extended using a task with the next minimum heuristic value. The heuristic function Hk = dk + W  EST (Tk ) is an integrated heuristic which captures the deadline and resource requirements of task Tk , where W is an input parameter. The termination conditions are either (a) a complete feasible schedule has been found, or (b) maximum number of backtracks or H function evaluations has been reached, or (c) no more backtracking is possible. If the value of k is constant (and in practice, k will be small when compared to the task set size n), the complexity of the algorithm is linearly proportional to n, the size of the task set [6].

3.2 Description of the Proposed Algorithms It is assumed that the scheduling algorithm has complete knowledge about the currently active set of tasks, but not about the new tasks that may arrive while scheduling the current set. Here, we propose two types of algorithms: In Type 1 algorithms, a newly arrived task is either accepted or rejected, based on the result of a single scheduling attempt. No rescheduling of tasks takes place. In Type 2 algorithms, if the rst scheduling attempt fails, the task set (including the new task) is iteratively rescheduled with QoS degradation until either a feasible schedule is produced or a speci ed maximum number of iterations is reached.

3.3 Admission Test It is helpful to perform a preliminary admission test with the estimated execution time of the tasks before actually running the scheduling algorithm. That is, if the sum of the execution time of the tasks is greater than the amount of CPU time that the system can provide, there is no way the scheduler can create a feasible schedule. With this test the system can take some actions much more quickly since the cost of this test is much less than that of the actual scheduling test. 6

1. Minimum quality test : If the sum of the mandatory time of the tasks in the currently active task set (including the newly arrived task) is greater than number of processors * scheduling period, then the new task is immediately rejected, so as to guarantee the minimum quality of the already admitted tasks. Scheduling period is the time interval between the current time and the latest deadline of the tasks in the task set. 2. Maximum quality test : If the sum of computation time of the tasks in the currently active task set (including the newly arrived task) is greater than number of processors * scheduling period, then the task set is not schedulable for maximum quality.

3.4 Type 1 Algorithms Two extreme cases are possible in which no rescheduling is required. However, there is a trade-o between the quality and the schedulability of tasks. The algorithms corresponding to these two cases are: 1. Maximum quality algorithm In this algorithm, the optional portion of the newly arrived task is treated as mandatory. The newly arrived task is admitted if the task set (including the new task) can be feasibly scheduled, otherwise it is rejected. Though the quality for the tasks would be maximum the schedulability of tasks would be low. In this situation the algorithm behaves like the myopic algorithm. 2. Minimum quality algorithm In this algorithm, the optional portion of the newly arrived task is skipped completely. The newly arrived task is admitted if the task set (including the new task) can be feasibly scheduled, otherwise it is rejected. Though the quality of the tasks would be minimum, the schedulability would be high. The optional tasks will be skipped even if the resources are idle.

3.5 Type 2 Algorithms In Type 2, two algorithms result depending on whether rescheduling is done once or more than once. They are: 1. 0/1 degradation algorithm In this algorithm, the newly arrived task is scheduled by treating the optional portion of the task as mandatory, using the myopic algorithm. If the task set, including the new task, is not schedulable then the optional portion of the tasks in the currently active task set is skipped totally and the task set is rescheduled, using the myopic algorithm. The task is admitted or rejected 7

depending on whether scheduling succeeds or fails. This is called 0/1 degradation algorithm since we provide either minimum or maximum quality. 2. Multilevel degradation algorithm In this algorithm, the QoS of the tasks is degraded iteratively, so as to give maximum possible quality while meeting the deadline of tasks. When a new task arrives, the maximum quality admission test is performed. If the maximum quality test fails, the computation time of optional tasks in the currently active task set (including the new task) is reduced so that the maximum quality test succeeds and the task set is rescheduled. If the task set is not schedulable, the computation time of the optional tasks is adjusted iteratively, using the divide and conquer approach, until maximum ? 1 number of iterations is reached or scheduling succeeds, whichever is earlier. If the task set is still not schedulable then in the last iteration the optional portion of all the tasks is skipped totally and the task set is rescheduled. The new task is accepted or rejected depending on whether the task set is schedulable or not.

3.6 Scheduling Algorithm The run time scheduling algorithm given below schedules the tasks using one of the four proposed algorithms. The values of the input parameters MaxIterations and Quality determine the algorithm to be used. If MaxIterations = 0, then the Type 1 algorithms are chosen with the Quality parameter distinguishing between the two Type 1 algorithms. If MaxIterations = 1, then 0/1 degradation algorithm is chosen and for MaxIterations > 1 the multilevel degradation algorithm is chosen. The complexity of all the four algorithms is of the same order, linearly proportional to n, the size of the task set. Integrated Scheduling Algorithm (MaxIterations,Quality) /* MaxIterations: maximum number of times the

degradation procedure can be invoked, Quality: maximum or minimum quality if MaxIterations = 0; both are input parameters. */

begin

1. Insert the newly arrived task into the currently active task set. 2. If MaxIterations = 0 (a) (b) (c) (d)

If Quality = minimum then ci := mi for the new task. Else if Quality = maximum then mi := ci for the new task. Perform admission test for minimum/maximum quality. If successful i. Schedule the task set using the myopic algorithm.

8

ii. If (feasible is TRUE) then the task is admitted else rejected. (e) Else reject the task and exit. 3. Else if MaxIterations > 0 (a) Perform maximum quality admission test. (b) If (successful) i. NumIterations := 1 ii. Schedule the tasks using the myopic algorithm. (c) Else i. feasible := FALSE ii. NumIterations := 1 iii. Perform minimum quality admission test. iv. If (not successful) reject the task and exit. (d) If feasible is FALSE i. Degrade QoS(MaxIterations, NumIterations) ii. Schedule the task set using the myopic algorithm iii. NumIterations := NumIterations + 1 (e) Repeat step (e) until NumIterations  MaxIterations or feasible is TRUE (f) If (feasible is TRUE) then the task is admitted else rejected.

end

4 Integrated Scheduling of Multimedia and Hard Real-Time Tasks 4.1 Prior Work In [10], algorithms for integrated scheduling of hard aperiodic tasks and periodic multimedia streams were proposed based on the multimedia server approach. The server is a periodic task with its period equal to the minimum period of all the streams multiplexed onto the server. Task executions of multiple streams are multiplexed onto one server instance. Two approaches, proportional allocation and individual allocation, were proposed for allocating multimedia streams to server instances. In the proportional allocation approach, each multimedia task instance is proportionally allocated to multiple server instances. In the individual allocation approach, each multimedia task instance is individually assigned to a server instance. The server instance to which the task is assigned has to be located between the task's ready time and its deadline. If no such server instance exists, then a new server instance with period equal to that of the multimedia task is created dynamically. All server instances whose start times are before the latest deadline of the hard real-time task in the currently active task 9

set are scheduled along with the hard real-time tasks using a planning based scheduling algorithm. If the task set is not schedulable then QoS degradation is resorted to by reducing the computation time of the server instances. However, in [10], no limit was xed regarding the amount by which the stream computation time can be decreased. How to quantify the resulting QoS of the degraded streams was left as an open problem. Moreover, how to specify and guarantee the minimum quality requirement of multimedia streams was also not dealt with.

4.2 QoS Mapping Using our proposed integrated task scheduling algorithm, the multimedia streams can be modeled by the (m,k)- rm guarantee model. The minimum quality requirement is captured by the m and k parameters. The streams are mapped onto server instances using the individual allocation algorithm since the proportional allocation algorithm has high context switch overhead [10]. Some of these multimedia tasks would be optional as characterized by the (m,k) parameters of the stream. Hence a server instance will have mandatory time equal to the sum of the m stream instances and the computation time equal to the sum of computation times of the stream instances multiplexed onto it. This way the server instance behaves like an imprecise computation task and hence a study of the proposed algorithm in this environment is meaningful.

4.3 Scheduling Algorithm The scheduler performs the following steps when a new task arrives: 1. If the task is a multimedia stream, represent its QoS requirement using the (m,k)- rm guarantee model. Multiplex the task instances of the stream onto the existing server instances if possible, else create a new server instance. Insert all the server instances whose start times are before the latest deadline of the existing hard real-time tasks into the currently active task set. 2. Else If the task is a hard real-time task then (a) If the deadline of the new task is less than the existing hard real-time tasks, then the new task is inserted into the currently active task set queue (b) Else all the server instances whose start times are before the deadline of the incoming task are inserted into the currently active task set, along with the incoming task. 3. Schedule the tasks in the currently active task set using the integrated task scheduling algorithm presented in Section 3.6 10

4. If feasible is TRUE admit the new task else reject it. The algorithm will guarantee the minimum quality of all the admitted streams even if that requires rejection of a newly arrived hard real-time task.

4.4 Example Table 1 lists the tasks of a real-time task set. The unstarred tasks are the hard real-time tasks. The latest deadline of the hard real-time task is 108. Table 3 gives the server instances, using the individual allocation algorithm, for the multimedia streams given in Table 2. The starred tasks in table 1 are the server instances whose start times are before the latest deadline (108) of the hard real-time task in the task set. The value of the k, W and number of backtracks parameters is taken as 4, 1 and 1 respectively. RES1 and RES2 are the two resources which can be used either in shared or exclusive mode. As can be seen from the Figure 2, the schedule produced by the minimum quality algorithm is feasible whereas task 20 is rejected by the maximum quality algorithm. Schedule (c) is a feasible schedule produced by the multilevel QoS degradation algorithm. It can be seen that the quality provided by the multilevel algorithm is much higher than that of the minimum quality algorithm while meeting the deadline of task 20.

5 Simulation Studies To study the e ectiveness of the integrated scheduling algorithm in meeting task deadlines, we have conducted extensive simulation studies. We present the results only for integrated scheduling of multimedia and hard real-time tasks due to space constraints.

5.1 Task Generation The hard real-time task sets, for simulation, are generated using the following approach. 1. Tasks (of a task set) are generated till schedule length, which is an input parameter, with no idle time in the processors, as described in [15]. The computation time ci of a task Ti is chosen randomly between MIN C and MAX C. 2. The deadline of a task Ti is chosen randomly between MIN D and MAX D. 3. The resource requirements of a task are generated based on the input parameters UseP and ShareP. 11

ID

READY COMPUTATION DEAD- RES1 RES2 TIME TIME LINE MODE MODE 1 0 16 31 Exclusive Share 2 0 20 34 Share Share 3* 0 15 34 4 0 15 37 Share 5 10 14 50 Share 6 15 17 51 Share 7 16 22 55 8 30 21 65 Share 9* 34 3 68 10 36 18 69 Share 11 34 18 73 Exclusive Exclusive 12* 38 5 76 13 51 21 83 Share Exclusive 14 53 14 83 Share 15 56 19 90 16* 68 10 102 17 72 22 104 Share 18 73 21 105 19 77 16 106 Exclusive 20 80 10 108 Exclusive 21* 102 15 136

Table 1: Real-time task set ID READY COMPUTATION PERIOD M K TIME TIME 1 0 3 34 4 4 2 0 5 38 4 6 3 0 7 45 3 6

Table 2: Multimedia streams

12

ID READY COMPUTATION MANDATORY DEADTIME TIME TIME LINE 1 0 15 3 34 2 34 3 3 68 3 38 5 0 76 4 68 10 3 102 5 102 15 8 136

Table 3: Server instances P1

T1

P2 P3

T5

T8

T2 T3

T7

T4

0

10

T6 20

T13 T11 T10

T9 30

40

50

T15

11 00 1 0 00 11 00 11 00 11 T21 00 11 00 11

T19

T14

T 16

60

70

Server instance

T20

T17

Aperiodic hard real-time task Processor idle

T18 80

Quality = 35.5% 90

100

(a) Schedule produced by the minimum quality algorithm - Feasible

P1

T1

P2

T2

P3

T3 0

T7

T5 T6

20

30

40

T13

T17 T16

T14

T10

T8

T4 10

T9

T12

T19

T15

T11 50

T18

60

70

80

90

Quality = 100% 100

(b) Schedule produced by the maximum quality algorithm - Infeasible as T20 is not schedulable

P1

T1

P2 P3

T5

T2 T3 0

T7 T6

T4 10

T8

20

30

T12

T10 40

50

T14 60

T21

T18

T15

T11 T9

T17

T13

T19

T16 70

80

90

T20 100

Quality = 75% 110

(c) Schedule produced by the multilevel QoS degradation algorithm - Feasible

Figure 2: Schedules produced by 3 di erent algorithms 13

5.2 Stream Generation The real-time task set generated in this manner is, by itself, a feasible set. That is, in the absence of the multimedia streams, an optimal scheduler can nd a schedule for the task set. When the streams are appended to the task set, the task set may become infeasible, requiring QoS degradation for generating a feasible schedule. The multimedia streams are generated using the following approach. 1. The StrmLoad parameter speci es the stream load on a CPU. 2. The Period of the streams is chosen randomly between MIN P and MAX P. 3. The utilization of CPU by a task in each period is chosen randomly between MIN UTIL and MAX UTIL. The computation time is product of period and utilization. 4. The value of k is chosen randomly between MIN K and MAX K. 5. The MIN Q parameter speci es the minimum quality that any stream should have. m and k values are adjusted to integers satisfying the minimum quality requirement m=k  MIN Q. 6. The steps (2-5) are repeated until utilization of the streams = StrmLoad * number of processors. 7. The m value for the n streams is adjusted such that the average quality of the streams AV G Q = Pni=1 mc . AVG Q speci es the average minimum quality requirement of all the streams. 100 ? kp AV G Q is the maximum amount by which the quality for the stream set thus generated can be degraded. i

i

5.3 Simulation Method The streams are mapped onto the multimedia server and the mandatory time and optional time of each server instance is computed based on the m and k values of the streams. All the server instances whose start times are before the latest deadline of the hard real-time task set are added to the task set. These task sets are then scheduled by the integrated algorithms. The algorithms compromise on the quality of multimedia streams to enhance schedulability. Therefore to evaluate the performance of the algorithms the metrics used are: 1. Success ratio. This is a measure of schedulability of task sets and is de ned as total number of task sets found schedulable total number of task sets considered for scheduling 2. Quality of the streams. It is de ned as total time alloted to the streams in the schedule total time requested by the streams in the schedule 14

parameter MIN C MAX C MIN C MIN D num-proc StrmLoad MIN P MAX P MIN UTIL MAX UTIL MIN K MAX K MIN Q AVG Q MaxIterations

explanation minimum computation time of tasks, taken as 10. maximum computation time of tasks, taken as 30. minimum deadline of the tasks, taken as 60. maximum deadline of the tasks, taken as 90. number of processors considered for simulation, taken as 4. percent of stream load on each CPU, taken as 10. minimum period of the stream, taken as 30. maximum period of the stream, taken as 50. minimum utilization of any stream, taken as 0.1. maximum utilization of any stream, taken as 0.2. minimum value of k parameter, taken as 2. maximum value of k parameter, taken as 6. minimum quality of any stream, taken as 30. average quality of the streams, taken as 70. maximum iterations for multilevel algorithm, taken as 3.

Table 4: Simulation parameters The plotted quality values were obtained by averaging the quality of the streams for those task sets which were schedulable after QoS degradation. The parameters used in the simulation studies are given in Table 4. Each point in the performance curves (Figs.3-7) is the average of 5 simulation runs, each with 300 task sets. Each task set contains approximately 100 to 125 tasks by xing the schedule length to 400 during the task set generation. For all the simulation runs, the number of instances of every resource is taken as 2.

5.4 Simulation Results Figs. 3-7, represent the success ratio and the quality of the streams plotted by varying the parameters StrmLoad, AVG Q, num-proc, MAX C and MAX D, respectively.

 The performance curves for which the success ratio has been plotted are : 1. QoS Deg Algos - The success ratio of the multilevel degradation algorithm, 0/1 degradation algorithm and the minimum quality algorithm. They are equal since in all the three cases the maximum possible degradation, in quality, is the same, i.e., 100 ? AV G Q. 2. No Deg - Maximum quality algorithm with no degradation in stream quality.

 The quality of the streams is plotted for: 15

1. Mlvl Deg Algo - Each of the plotted value is the average of the stream quality of those task sets which are schedulable by QoS degradation algorithms but are not schedulable by maximum quality algorithm. It is to be noted that all task sets schedulable by maximum quality algorithm are also schedulable by multilevel and 0/1 algorithm with 100% quality for the streams. 2. Min Quality Algo - Each of the plotted value is the average of stream quality for task sets schedulable for minimum quality.

5.5 E ect of Stream Load Fig. 3 shows the e ect on success ratio and the quality of the streams by the variation of stream load, for a xed hard real-time task load. It can be seen that the success ratio keeps decreasing as the stream load is increased, for all the algorithms. This is because the increased stream load leaves less CPU time for hard real-time tasks, thus the tightness of scheduling increases. The results show that the QoS degradation algorithms perform much better than the maximum quality algorithm. For example, with an 8% stream load on each CPU the success ratio for maximum quality algorithm goes down to 19%, whereas the QoS degradation algorithms achieve 53%. Quality - It is observed that the stream quality decreases as stream load increases. This is because increased stream load leaves less CPU time for hard real-time tasks and higher amount of degradation would release more time for these tasks. The multilevel degradation algorithm gives higher quality than the 0/1 degradation and minimum quality algorithms. For example, when the stream load is 6%, the quality is 83% for multilevel algorithm whereas, it is 63% for the 0/1 degradation algorithm. The 0/1 degradation algorithm performs better than minimum quality algorithm since the average stream quality is higher in 0/1 degradation algorithm. 0/1 degradation algorithm degrades quality only if the task set is not schedulable for maximum quality, whereas the minimum quality algorithm follows a conservative policy of providing minimum quality even if the resources are idle. For example, when the stream load is 6%, 0/1 algorithm provides 100% quality for 50% of the task sets and 66% quality for 30% of the task sets, whereas the minimum quality algorithm provides 66% quality for all the 80% schedulable task sets. From these results we can conclude that multilevel algorithm provides the best performance in terms of both the metrics.

5.6 E ect of Minimum Quality of Streams Fig. 4 shows the e ect of varying the minimum quality of the streams on success ratio and quality of the streams, for a constant task load. It can be observed that the success ratio for maximum quality algorithm is almost 0%. This is because of the task generation procedure which generates a 16

tight schedule for hard real-time task and addition of multimedia server instances causes the task set to become infeasible. But for QoS degradation algorithms as the minimum quality requirement of streams increases, the success ratio decreases. This is because with increased minimum quality of streams less time can be made available by way of degradation of stream quality, and hence lower success ratio. For example, the success ratio which is 90% for 30% minimum quality of streams comes down to 20% for 70% minimum quality of the streams. This result clearly brings out the exibility and increased schedulability of the proposed algorithms compared to that of the maximum quality algorithm. Quality - The quality of the streams increases with the increase in minimum quality requirement, as expected. The quality of the multilevel algorithm is higher than the other algorithms. For example, when the minimum quality requirement is 30% the multilevel algorithm gives 60% stream quality and this di erence narrows down with an increase in minimum quality of the streams. This result shows that the algorithms always guarantee the minimum quality requirement of the admitted streams. It may be noted that the plotted values of stream quality are lower than the minimum quality of the streams. This is because of the way the m and k values are xed in the stream generation procedure and because of guaranteeing only the mandatory portion of the server instances in the schedule length.

5.7 E ect of Number of Processors Fig. 5 shows the e ect on success ratio and quality by varying the number of processors for a constant stream load. The hard real-time load increases as the number of processors is increased because of the hard real-time task generation procedure, which generates a tightly packed schedule for each processor. It can be observed that as the number of processors increases the success ratio increases. Since the stream load is xed, increase in number of processors decreases the stream load per processor and hence the success ratio increases. The success ratio of the QoS degradation algorithms is higher than that of the maximum quality algorithm. For example, when the number of processors is 5, the success ratio for QoS degradation algorithms is 50% compared to 15% for the maximum quality algorithm. Quality - The stream quality for the multilevel degradation algorithm is higher than that of the other algorithms. The quality is about 20% higher when the number of processors is greater than 3. For example, for a degradation in stream quality of just 17% the multilevel degradation algorithm o ers 45% higher success ratio compared to the maximum quality algorithm.

5.8 E ect of Laxity Fig. 6 shows the e ect on success ratio by varying the deadline of the hard real-time task set. The X-axis shows the average laxity of the tasks. Laxity is the di erence between the average deadline and maximum computation time of a task. The CPU load is the same for each deadline range, 17

100

85 QoS Deg Algos No Deg

90

Mlvl Deg Algo Min Quality Algo 80

Quality of the streams (%)

Success ratio ( %)

80 70 60 50 40 30 20

75

70

65

60

10 0

55 2

4

6 8 10 (%) Stream load on each CPU

12

14

2

4

6 8 10 (%) Stream load on each CPU

12

14

80

90

Figure 3: E ect of stream load

90

100 QoS Deg Algos No Deg

80

Quality of the streams (%)

70

Success ratio ( %)

Mlvl Deg Algo Min Quality Algo

90

60 50 40 30 20

80 70 60 50 40 30

10 0

20 30

40

50 60 70 Minimum quality of the streams

80

90

30

40

50 60 70 Minimum quality of the streams

Figure 4: E ect of quality of streams

100

85 QoS Deg Algos No Deg

90

80

Quality of the streams (%)

Success ratio ( %)

80 70 60 50 40 30 20

75

Mlvl Deg Algo Min Quality Algo

70

65

10 0

60 2

3

4 5 6 Number of processors

7

8

2

3

4 5 6 Number of processors

Figure 5: E ect of number of processors 18

7

8

100

84

90

82 QoS Deg Algos No Deg

80

Quality of the streams (%)

Success ratio ( %)

80 70 60 50 40 30

78 76

72 70

20

68

10

66

0

Mlvl Deg Algo Min Quality Algo

74

64 40

50

60 70 80 Laxity of hard real-time tasks

90

100

40

50

60 70 80 90 Laxity of the hard real-time tasks

100

Figure 6: E ect of laxity because of the task generation procedure. The success ratio keeps increasing as the hard real-time task laxity increases.The success ratio of the QoS degraded streams is signi cantly higher than that of the maximum quality algorithm. For example, when the average laxity is 55, the success ratio is 72% for QoS degradation algorithms compared to 17% for maximum quality algorithm. The success ratio is sensitive to laxity, especially for the low laxity values. For example, when the laxity value is increased from 35 to 45, the success ratio for the QoS degradation algorithm increases from 28% to 53%. As the laxity of the hard real-time tasks increases the server instances can be easily accommodated without any deadline miss of the hard real-time tasks. Quality - The quality of the streams increases with increasing laxity. The stream quality of multilevel degradation algorithm is higher than that of 0/1 degradation and minimum quality algorithms.

6 Conclusions Tasks in real-time systems are of two types : hard deadline tasks and QoS degradable (soft deadline) tasks. The QoS of soft real-time tasks can be represented by the imprecise computation and (m,k) rm guarantee workload models. These models quantify the trade-o between schedulability and result quality. The existing algorithms for scheduling of real-time tasks consider each of these models independently. However, many real-time applications have a mix of hard real-time tasks, imprecise tasks, and (m,k)- rm guarantee tasks. In this paper, we have proposed dynamic scheduling algorithms for integrated scheduling of tasks, represented by these models, in multiprocessor real-time systems. The proposed algorithms improve schedulability by exploiting the properties of these models in QoS degradation. The algorithms di er in the policy they adopt to degrade the quality of soft real-time tasks. The policies used are: (i) Maximum quality policy, (ii) Minimum quality policy, (iii) 0/1 degradation policy, and (iv) Multilevel degradation policy. We have also shown how the proposed algorithms can 19

be adapted for integrated scheduling of multimedia streams and hard real-time tasks. In our work, (m,k)- rm guarantee model was used to represent the QoS requirement of the multimedia streams . The metrics, success ratio (measure of schedulability) and quality of multimedia streams were used to evaluate the performance of the algorithms. From the simulation studies, the following inferences are drawn.

 The multilevel degradation algorithm o ers the best performance in both the metrics.  The schedulability of the QoS degradation algorithms is always higher than that of the maximum quality algorithm (no QoS degradation).

 A small degradation in the quality of multimedia streams (which may constitute less than 10% of system load) can signi cantly improve schedulability of the system.

Since multimedia information is being increasingly used in many real-time systems, the proposed algorithms can signi cantly improve the performance of such systems. The proposed QoS degradation policies can also be extended to systems having multimedia and non-real-time tasks. Currently, we are exploring the viability of the proposed algorithms for scheduling of both periodic and aperiodic hard real-time tasks together with multimedia streams in multiprocessor real-time systems.

References [1] K.G.Shin and P.Ramanathan, \Real-time computing: A new discipline of computer science and engineering," Proc. IEEE, vol.82, no.1, pp.6-24, Jan. 1994. [2] K.Ramamritham, and J.A.Stankovic, \Scheduling algorithms and operating systems support for real-time systems," Proc. IEEE, vol.82, no.1, pp.55-67, Jan. 1994. [3] J.Xu and L.Parnas, \Scheduling processes with release times, deadlines, precedence, and exclusion relations," IEEE Trans. on Software Engg., vol.16, no.3, pp.360-369, Mar. 1990. [4] K.Ramamritham, \Allocation and scheduling of precedence-related periodic tasks," IEEE Trans. on Parallel and Distributed Systems, vol.6, no.4, pp.412-420, Apr. 1995. [5] M.L.Dertouzos and A.K.Mok, \Multiprocessor on-line scheduling of hard real-time tasks," IEEE Trans. on Software Engg., vol.15, no.12, pp.1497-1506, Dec. 1989. [6] K.Ramamritham, J.A.Stankovic, and P.-F.Shiah,\Ecient scheduling algorithm for real-time multiprocessor systems,"IEEE Trans. on Parallel and Distributed Systems, vol.1, no.2, pp.184-194, Apr. 1990. 20

[7] J.W.S.Liu, W.K.Shih, K.J.Lin, R.Bettati, and J.Y.Chung, \Imprecise computations," Proc. IEEE, vol.82, no.1, pp.83-94, Jan. 1994. [8] P.Ramanathan, \Graceful degradation in real-time control applications using (m,k)- rm guarantee,"Proc. FTCS 1997, pp.132-141. [9] J.W.S.Liu, K.J.Lin, W.K.Shih, A.C.Yu, J.Y.Chung, and W.Zhao, \Algorithms for scheduling imprecise computations," IEEE Computer, vol.24, no.5, pp.58-68, May 1991. [10] H.Kaneko, J.A.Stankovic, S.Sen, and K.Ramamritham, \Integrated scheduling of multimedia and hard real-time tasks," Proc. RTSS, pp.206-217, 1996 (UMASS CS TR 96-45, 1996). [11] J.Neih and M.S.Lam, \The design, implementation and evaluation of SMART: A scheduler for multimedia applications," Proc. ACM Symposium on Operating Systems Principles, St.Malo, France, Oct. 1997. [12] M.B.Jones, D.Rosu, and M-C.Rosu, \CPU reservations and time constraints: Ecient, predictable scheduling of independent activities," Proc. ACM Symposium on Operating Systems Principles, St.Malo, France, Oct. 1997. [13] K.Kong, M.Kim, H.Lee, J.Lee, \A rate regulating scheme for scheduling multimedia tasks", IEICE Trans. on Information and Systems, vol.E80-D, no.12, pp.1166-1175, Dec. 1997. [14] G.Manimaran, C. Siva Ram Murthy, M.Vijay, and K. Ramamritham, \New algorithms for resource reclaiming from precedence constrained tasks in multiprocessor real-time systems," J. of Parallel and Distributed Computing, vol.44, pp.123-132, 1997. [15] G. Manimaran, C. Siva Ram Murthy, and K. Ramamritham, \A new approach for scheduling of parallelizable tasks in real-time multiprocessor systems," Real-Time Systems., vol.15, pp.39-60, July 1998.

21

Suggest Documents