A Real-Time Scheduling Algorithm for Soft Periodic Tasks - CiteSeerX

2 downloads 154 Views 1MB Size Report
performance was compared with the EDF algorithm as well as three ... ensure that a system is schedulable (i.e., every task will meet all its ... comparison with three related methods. Finally .... parameters are used for each task which are ticket.
A Real-Time Scheduling Algorithm for Soft Periodic Tasks Sedigheh Asiaban, Mohsen Ebrahimi Moghaddam, Maghsoud Abbaspur

A Real-Time Scheduling Algorithm for Soft Periodic Tasks Sedigheh Asiaban, Mohsen Ebrahimi Moghaddam*Corresponding author, Maghsoud Abbaspur Electrical and computer engineering department, Shahid Beheshti University; G.C., Tehran, Iran [email protected];[email protected];[email protected] doi: 10.4156/jdcta.vol3.issue4.11

Abstract

systems, the violation of timing constraints of certain tasks should not be acceptable [2]. For example, not executing a task before its deadline may lead to catastrophic consequences in certain environments such as patient monitoring systems, nuclear plant control, and etc. On the other hand, in soft real-time systems, although system performance is decreased when deadline is missed but it does not have serious damage on the system [3]. The transmission of continuous media of multimedia systems is one of the typical tasks in soft real-time environments. Hard real-time scheduling theory determines the schedulability of a system based on the worst case execution times (WCET) of the tasks. In order to ensure that a system is schedulable (i.e., every task will meet all its deadlines), the ratio of WCET of each task to its period of processor time should be assigned to. The hard real-time scheduling methods cannot be used in soft real-time systems, because designing a soft realtime system using hard real-time scheduling theory often yields a system whose utilization is unacceptably low [4]. Therefore, to extend this theory for soft realtime systems, average execution time is used in the schedulability analysis instead of WCET that is very unlikely to occur [5]. However, according to this new approach, tasks can overrun, that is the actual execution time required by elements of them (which will be henceforth called jobs) may exceed the one assumed in the schedule phase. Due to overrun, the system overload may happen (a system overload occurs when the overall system load exceeds 1). System overload causes an unbounded number of deadline misses [5], hence, overrun and overload would be considered as long as the statistical QoS requirements are guaranteed for each task [5, 6]. As a result, in these situations a suitable algorithm is needed to guarantee the system performance and QoS requirements. On the other hand, in modern real-time systems, tasks are scheduled in a priority driven manner [4]. In the context switch phase; the ready job with the highest priority executes. Most systems assign a fixed priority such that all jobs in a task have the same priority. Examples of fixed priority policies are Rate Monotonic (RM) [7] or Deadline Monotonic (DM) [8]. The

Since now, some scheduling algorithms have been presented to guarantee the time constraints of soft real-time tasks, but most of them have some drawbacks. The first drawback of them is that scheduling decisions are based on parameters which are assumed to be crisp; however, in many environments the values of these parameters are uncertain. The second one is the high time complexity of these methods. In this paper, a new soft real time scheduling algorithm, called Maximum Miss First (MMF), is proposed to overcome some of these disadvantages. MMF determines priority of tasks according to their miss ratios. The miss ratios of all the system tasks are approximately equal when MMF is used. Because miss ratio affects other QoS parameters, using MMF is suitable for systems that need similar QoS for its tasks even in overrun and overload conditions. To evaluate MMF, its performance was compared with the EDF algorithm as well as three recent works in this context (gEDF, RLP and RD-EDF) by simulation. Simulation results showed that MMF generally outperformed the EDF, RD-EDF, RLP, and gEDF in terms of system utilization, output jitter, and fairness, but gEDF had higher success ratio because it tends to service smaller jobs. The time complexity of proposed method is near to EDF.

Keywords Soft Real-time Systems, Scheduling, Task Overrun, Overload Handling, EDF, RD-EDF, gEDF, RLP and QoS.

1. Introduction The correctness of real-time systems depends not only on the logical results of computation, but also on the time at which the results are produced [1]. Therefore, these systems are classified into two categories based on their timing constraints: hard realtime and soft real-time systems. In hard real-time

100

International Journal of Digital Content Technology and its Applications Volume 3, Number 4, December 2009 priority of a task under RM is proportional to the rate at which jobs in the task are released while the priority of a task under DM is inversely proportional to the relative deadline of the task. Also, priorities may also be assigned dynamically: the most common dynamic priority scheduling policy is Earliest Deadline First (EDF) [7] which assigns priorities to jobs in order of their absolute deadlines. These algorithms are known as baseline algorithms in real-time scheduling. They are optimal algorithms because they ensure that no deadlines are missed by them; if any fixed or dynamic priority algorithm exists to schedule tasks without missing a deadline. However, the baseline algorithms have some drawbacks to cope in soft real-time tasks under overrun and overload conditions. For example, because of period (relative deadline) and priority couples in RM (DM), tasks with longer periods miss deadlines more frequently than tasks with shorter periods. As a result, the criticality of tasks is ignored. Therefore, these algorithms are required to have the strict admission control to prevent unpredictable behaviors when the overrun and overload conditions occur [3]. The strict admission control may cause low utilization of recourses [6, 9]. In the present paper, to overcome the drawback of baseline algorithms in overrun and overload conditions and getting QoS requirements, we have proposed a scheduling algorithm that is called MMF. MMF scheduling policy serves jobs in a decreasing order of their miss ratio, and as a result, distributes misses among tasks fairly. In MMF, same as EDF, deadline of each job should be specified before the system starts and its time complexity is near to EDF. The MMF is proper for soft real time systems that they need to get similar QoS for all tasks. The rest of the paper is organized as follows: in section 2, related works on overrun and overload handling in soft real-time scheduling is described. In section 3, the system model and three related algorithm that were compared by proposed method are introduced. The proposed MMF algorithm is presented in section 4. Section 5 gives simulation results of the proposed algorithm, including performance comparison with three related methods. Finally, the paper is concluded in section 6.

at the task or job level are enforced by algorithm. Isolation property holds when the effect of an overrun job in a task does not affect jobs that belong to other tasks (isolation-task) or to the same task (isolationjob). These algorithms are called overrun handling mechanism because main difference among them is in the way of dealing with overrun jobs while normal jobs are scheduled with a base algorithm (EDF, RM and DM) by them. In contrast, other algorithms (that a guaranteed execution time is not determined) select jobs for scheduling or drop them according to a given rule, regardless of whether they are overrun or not. Overrun Server Method (OSM), is a task transform method proposed by Tia et al. [10]. Under OSM, a job is released for execution and it is scheduled according to the baseline algorithms. At the time of overrun, the execution of the job is interrupted and the remaining part of the job is released as an aperiodic request to a server. A Sporadic Server (SS) [11] is used to execute the requests in fixed priority systems while either a Constant Utilization Server (CUS) [12] or Total Bandwidth Server (TBS) [13] is used to execute requests in a dynamic priority system. In particular, since the job is enforced to migrate to the respective server as soon as it starts to overrun, it can affect neither the other jobs in the same task nor in the other tasks, so that both job-level and task-level isolation are maintained. However, the overrunning jobs are penalized in corresponding with server priority such that their overrunning parts are interrupted and serviced with a lower priority. When dealing with a mixed task set that is made up of both hard and soft real-time tasks, OSM can be used to provide deterministic guarantees on deadline meeting to hard real-time tasks. Statistical Rate Monotonic Scheduling (SRMS) achieves task level isolation by allowing overrunning jobs to run while the subsequent jobs in the same task might be affected by overrunning job [14]. This approach collectively allocates a predetermined budget of the processor time to each task for all released jobs within every super-period (the period of the next high priority task). In this method, an overrunning job can continuously consume the budget of the corresponding super-period without any suspension. The subsequent jobs are dropped if the remaining budget is not enough for them to be completed within their deadline and there is no spare processor time to reclaim. In this approach, if there is enough spare processor time to reclaim, the overrunning jobs may succeed in completing without affecting the subsequent jobs. Moreover, even though the subsequent jobs are affected by the preceding jobs, there is still the possibility that the subsequent jobs complete within the deadlines if they underrun ( i.e., if they require less

2. Related Works Since now, some methods have been proposed to deal with soft real-time scheduling, particularly when periodic tasks have variable execution times. These methods differ according to whether they specified a guaranteed execution time for each task or not. In algorithms that a guaranteed execution time is determined for each task, often some isolation property

101

A Real-Time Scheduling Algorithm for Soft Periodic Tasks Sedigheh Asiaban, Mohsen Ebrahimi Moghaddam, Maghsoud Abbaspur than the amount of processor capacity allocated by the scheduler). Since overrunning jobs in SRMS can only be serviced with either the processor time allocated to the relevant tasks or some spare processor time, an overrunning job of a task cannot affect the jobs of the other tasks, so task-level isolation is satisfied. In comparison with OSM, the overrunning jobs in SRMS have more chances to meet their deadlines, but as a single overrun may drop some number of subsequent jobs due to the lack of available budget; it degrades the system performance (i.e., increasing deadline miss) when the load of system is high. Overrun handling approaches based on adaptive feedback control have also been proposed in [25]. Adaptive feedback control scheduling is very promising and particularly useful when the system workload cannot be accurately modeled. It requires addressing a number of issues such as choice of appropriate control function and a method to enforce the system stability without affecting real-time constraints. Moreover, with those approaches it is difficult to provide probabilistic guarantee to individual tasks, so the controlled variable is the overall deadline miss ratio instead of the deadline miss ratio of individual tasks. Another overrun handling approach is Isolation Server Method (ISM) [4] named for its use of SS [11], CUS [12], or TBS [13] to isolate other parts of the system from an overrunning job. In this method, jobs are submitted as aperiodic requests to the server assigned to their task at the release time and they are executed completely under server control. A server may be assigned to execute jobs from multiple tasks. Whereas OSM [10] requires a portion of the processor time to be allocated to servers independent of tasks, ISM allocates portions of the processor time to servers and does not allocate time to the tasks [4]. Because jobs of a task are released as requests to a server; an overrunning job under ISM can only delay the completion of jobs from tasks assigned to that server. As a result, Unlike OSM, no job isolation is provided in ISM. Also, task-level isolation may be lost with the ISM method when several tasks are assigned to a single server. Other approach to the overrun handling problem is ( m, k )-firm guarantee [15] that is a combination of ideas from the imprecise computation approach [16] and RM [7] policy. In the imprecise computation approach, the computation time of each job of a periodic task is divided into a mandatory and an optional part. The mandatory part of every job must complete within its deadline, and it is better to complete as much of the optional part as possible [16]. Besides, jobs of each task are classified as either

mandatory or optional such that if all the mandatory jobs of each task meet their respective deadlines, i.e., at least m out of any k consecutive jobs of all tasks meet their deadlines, then ( m, k )-firm guarantees

requirement is satisfied (note m and k parameters can have different value for each task). The scheduling of mandatory jobs of all tasks is done using the RM [7] policy. Job dropping in the ( m, k )-firm guarantee scheduling is aimed to prevent system from overload, not to control individual overruns of tasks. As a result, in this method, the dropping jobs are selected according to a given rule, regardless of whether they will overrun or not; the selected jobs are dropped as soon as they are released. Constant Bandwidth server (CBS) is an efficient technique that has been presented in [17] under a dynamic priority environment. In CBS, a fraction of the processor bandwidth is reserved for each task, and tasks are scheduled by EDF [7] using a suitable deadline which is computed as a function of the reserved bandwidth and actual requests. If a task requires executing more than expected, its deadline is postponed and its budget is replenished. This method allows to achieve task level isolation and overruns are handled efficiently based on their actual deadline. Another approach based on resource reclaiming called CASH (CApacity SHaring) [18]. CASH lightens the strict task isolation enforced by CBS [17] with sharing the spare time among all tasks. This causes to advance the execution of overrunning jobs. Modified Proportional Share scheduling Algorithm (MPSSA) has been suggested in [9] for scheduling continuous media tasks. In this algorithm, two parameters are used for each task which are ticket and pass . The former represents the relative amount of resources and is fixed during scheduling. The last one ( pass ) is a dynamic parameter that show how much of each task share do not acquire. The task with maximum pass selected in any instant. In [19], a soft real-time scheduling algorithm has been proposed using fuzzy logic. Scheduling decision of many algorithms in the literature is usually based on parameters which are assumed to be crisp. However, in many circumstances the values of these parameters are vague. Indeed, the fundamental aim in [19] is to conquest this vagueness using the modeling of these constraints through fuzzy logic. In this method, the input stage of fuzzy inference system (IFS) consists of two linguistic variables. The first one is an external priority which is a static priority assigned to the task from the outside world. One possible value may be the tasks request interval, as rate monotonic algorithm does [7]. The other input variable is deadline. This

102

International Journal of Digital Content Technology and its Applications Volume 3, Number 4, December 2009 input may easily be replaced by laxity, wait time, or so on, for other scheduling algorithms. Also, for the processing stage (inference engine) of proposed system, 11 rules have been produced that based on this rules the fuzzy priority of each job is determined. Thus, in this algorithm, for each task, its external priority and deadline is fed into the inference engine and the output of inference module is considered as priority of task. The highest priority task is executed until a scheduling event occurs. In this method, two situations are recognized: using laxity as a secondary parameter, and replacing the laxity parameter with deadline. In fact, two algorithms are suggested such that the first one used the laxity as the second parameter. This algorithm is called Minimum Fuzzy Laxity First (MFLF). The other algorithm proposed deadline as the second parameter. This one is called Minimum Fuzzy Deadline First (MFDF). These algorithms outperform the EDF while the time complexity of them is higher than EDF, because number of rules affects time complexity. In [20], Li, Kavi and Akl presented a nonpreemptive scheduling algorithm that uses multiple scheduling strategies. This approach, known as groupEDF (gEDF) is based on dynamic grouping of tasks with deadlines that are very close to each other. It uses Shortest Job First (SJF) to schedule tasks within the group. Because, the gEDF is used to evaluate the proposed method by comparing the results; the details of g-EDF are outlined in subsection 3.2. Another overrun handling mechanism called Randomized Dropping (RD) is suggested in [5]. It relaxes task isolation in dealing with overruns, thus provides soft task isolation which allows an overrun in a task to affect even jobs of other tasks. It has been shown that by relaxing task isolation in dealing with overruns, it is possible to exploit the system more efficiently comparing with methods enforcing strict isolation between tasks such as OSM [10], ISM [4], CASH [18], etc. In this method, RD has been also combined with both priority-driven and rate-based scheduling algorithms. The scheduling algorithms chosen in RD are the Earliest Deadline First (EDF) [1] and the Earliest-Completion-Time GPS (EGPS) algorithm proposed in [21]. Therefore, two overrun handling mechanisms are proposed based on the combination of RD with EDF and EGPS which are called RD-EDF and RD-EGPS, respectively. These methods are suitable for overload-prone soft real-time systems. The RD mechanism that is combined with EDF is described in subsection 3.3 in more detail. In [26], another approach has been presented that periodic tasks allow occasional deadline violations within given bounds specified according to the SkipOver task model. Hence, every task has a minimal QoS

guarantee which is expressed by the ratio of periodic task instances which must complete before their deadline. This work provides two on-line scheduling algorithms, namely RLP (Red as Late as Possible) and RLP/T, which enhance the existing Skip-Over algorithms. Aim of these algorithms is improving the actual QoS observed for periodic tasks (which is always greater or equal to the QoS guarantee). These novel scheduling techniques rely on the EDL (Earliest Deadline as Late as possible) scheduling strategy. The RLP algorithm is described in subsection 3.4 in more detail, because, it is used to evaluate the proposed method by comparing the results.

3. Background In this section the system model that is used throughout the paper are described. Also, gEDF, RDEDF, and RLP scheduling methods are described in more detail because the results of these algorithms have been used to be compared with proposed method results.

3.1 System Model Here a set

Γ = {τ 1 ,τ 2 ,...,τ N } of soft real time

periodic tasks with variable execution times that should be executed on a uniprocessor system are assumed. Each task τ i consists of an infinite sequence of jobs.

Tasks are independent and jobs do not share resources. The period of each task is fixed and its relative deadline can be less than\equal to\ larger than its period. The following notations are used in the rest of the paper:

J i ,k denotes the k th job of task τ i .

ei denotes the average execution time of task τ i . Pi denotes the period of τ i . Di denotes the relative deadline of task τ i that is the

maximum finishing time allowed for any job, relative to its release time. φi denotes the arrival time of τ i .

ei ,k denotes the execution time of job J i ,k . ri ,k denotes the release time of job J i ,k . Therefore, the

release

to ri ,k

= φi + (k − 1) Pi .

f i ,k

103

time

of

job

J i ,k

denotes the finishing time of job

is

J i ,k .

equal

A Real-Time Scheduling Algorithm for Soft Periodic Tasks Sedigheh Asiaban, Mohsen Ebrahimi Moghaddam, Maghsoud Abbaspur jobs). For this purpose, some decision points with the associated dropping probabilities are assigned to each task τ i . A decision point DPi , k (k = 1,2,..., K i ) is

d i ,k denotes the absolute deadline of job J i ,k . 3.2 gEDF Scheduling Method

defined as the time instant at which the execution time of job J i , j from task τ i reaches a given

gEDF is a non-preemptive scheduling algorithm that is based on dynamic grouping of tasks that have very close deadlines to each other. It uses Shortest Job First (SJF) to schedule tasks within each group [20]. A group in the gEDF algorithm depends on a group range parameter( Gr ). In gEDF, groups are defined as

predetermined for task τ i . The first decision point is

the time instant at which the corresponding job starts to overrun. At each decision point, the decision whether a job has to be dropped or not is taken according to the dropping probability DPRi , k (k = 1,2,..., K i ) associated to that decision point. RD can control the degree of overruns of each task between two extreme cases, i.e. allowing all overrunning jobs to complete their execution or dropping all of them. The first choice is equivalent with EDF and has the advantage that overrunning jobs may exploit the unused CPU times of underrunning jobs, but under high system load, when overruns make the system overloaded, a large number of deadline misses occur. On the other hand, the second choice prevents overrunning jobs from affecting non-overrunning ones, but this happens at the expense of systematically penalizing the overrunning jobs. The results obtained showed that according to the kind of execution time distribution (e.g., uniform or exponential), a single dropping point with a high dropping probability may be more effective than multiple dropping points with a lower dropping probability, and vice versa [5].

gEDFGroup = {τ k | τ k ∈ QgEDF , d k − d1 ≤ d1Gr ,

1 ≤ k , m ≤| QgEDF |}

d1 is the absolute deadline of the first job in the group, QgEDF is a queue for gEDF and | QgEDF |

where,

represents the length of queue

QgEDF [20]. In this

algorithm, Groups are selected by EDF and jobs in the selected group are scheduled by shortest job first (SJF) approach. Since gEDF algorithm tends to service smaller jobs, then more jobs can be completed, intuitively gEDF should lead to a higher success ratio than pure EDF. But, it does not always guarantee fairness. Also, the algorithm needs to sort the jobs in each group, which could incur more overhead during execution than EDF. However, in most practical systems, the number of jobs in a group is small and the added runtime overhead is negligible [20]. Furthermore, this algorithm requires the exact execution time of jobs be known as a priori. This requirement is not always satisfiable.

3.4 RLP Scheduling Method The Skip-over model is the RLP basis in scheduling of periodic tasks on a uni-processor system and allows occasional deadline violations (i.e. skippable periodic tasks). In this model, a task is characterized by a worstcase computation time, a period, a relative deadline equal to its period, and a skip parameter ( si ) which

3.3 RD-EDF Scheduling Method RD-EDF is an approach for handling overruns in soft real-time system. It assumes a guaranteed execution time determined that



N

i =1

eigrt

as

a

for each task τ i that should be priori

information

identifies the tolerance of this task to the missing deadlines. The distance between two consecutive skips must be at least si periods. When si equals to

such

grt i

e ≤ 1 . The schedule is built on the EDF Pi

infinity, no skips are allowed and this task is equivalent to a hard periodic. One can view the skip parameter as a QoS metric (the higher si , the better the quality of

policy. RD-EDF algorithm works same as EDF as long as selected job for execution do not overrun. When a job overruns, i.e., when it requires more than its guaranteed execution time, the Randomized Dropping (RD) is applied to determine whether to allow the job to continue or drop it. If the job is allowed to continue, it executes with its original priority (this approach is different from the Overrun Server Method [4] because RD does not decrease the priorities of the overrunning

service). Every instance of a task can be red or blue. A red task instance must complete before its deadline; a blue task instance can be aborted at any time. However, if a blue instance completes successfully, the next task instance is still blue. The objective of RLP algorithm is to bring forward the execution of blue task instances so as to minimize the

104

International Journal of Digital Content Technology and its Applications Volume 3, Number 4, December 2009 ratio of aborted blue instances, thus enhancing the actual QoS (i.e., the total number of task completions) of periodic tasks. From this perspective, RLP scheduling algorithm, which is a dynamic scheduling algorithm, is specified by the following behavior: 1. if there are no blue task instances in the system, red task instances are scheduled as soon as possible according to the EDF (Earliest Deadline First) algorithm. 2. if blue task instances are present in the system, these ones are scheduled as soon as possible according to the EDF algorithm (note that it could be according to any other heuristic), while red task instances are processed as late as possible according to the EDL algorithm.

4.

N imiss (t )

The MMF is a non-preemptive dynamic priority scheduling algorithm that uses miss ratio and deadline of a task as its priority. It is a simple algorithm that assigns highest priority to a task with the maximum miss ratio. If there are two or more tasks with the same maximum miss ratio, task with earliest deadline (EDF algorithm) selected as highest priority. The miss ratio of task τ i at time t is defined as

N imiss (t ) N i job (t )

τi

t and N i job (t ) is number of released jobs of task τ i at time t . The steps of MMF are summarized

2.

τi

at time

t is arrived,

Ni

job

(t )

is

each task is

QRe ady ) and

increased

by

li =

one

When the processor is idle at time , parameter of each task

li that is defined as

ei Pi

(2)

And the average system load is defined as

( N i job (t ) = N i job (t ) + 1 ). 3.

τi

one

uniformly in the range [1,2 × ei − 1] . The average load of

MRi (t ) , N i job (t ) and N imiss (t ) parameters are set to zero. If job J i ,k at time t is released, it is inserted in ready queue (

by

In this section, MMF algorithm is compared with EDF, gEDF, RD-EDF, and RLP using an exhaustive simulation. The performance of these algorithms is measured in terms of overall miss ratio, output jitter, jitter variance, miss variance, and consecutive miss of system. Also, to demonstrate the fairness of MMF, these parameters are calculated for each task individually. All the simulations presented in this section have been conducted on a set consisting of 5 periodic and non-preemptive tasks ( N = 5 ). The execution time distribution of the tasks was assumed to be uniform, where the execution time of a task was generated

at time

as follows: 1. When a new task

incremented

5. Simulation Results

(1)

That N imiss (t ) is number of missed jobs of task

is

( N imiss (t ) = N imiss (t ) + 1 ). The MMF acts similar to EDF when the system is underloaded because, the miss ratio of tasks is zero and scheduling decisions are often determined based on deadline. Also, this algorithm needs just deadline parameter of each job to be specified before the system starts, while gEDF needs the execution time of each job and RD-EDF needs the guaranteed execution time of each task to be specified. Also, they need the deadline of jobs. The MMF is a functional method for soft real time systems that QoS requirements of all tasks are same (i.e. not very diverse), because MMF distributes the total miss of system over tasks with regards to the number of jobs of tasks. Also, the overrun condition as long as does not cause overloading in system have no affect on the MMF performance because it does not depend on the predetermined burst time of tasks.

4. Proposed Method: Maximum Miss First (MMF) Scheduling

MRi (t ) =

the same maximum miss ratio, task with earliest deadline selected. If deadline of job J i ,k at time t is missed,

MRi (t )

N

L(Π ) = ∑ li

is updated

i =1

according to equation (1). Then, the job of task with maximum miss ratio is selected for execution. If there are two or more tasks with

105

(3)

A Real-Time Scheduling Algorithm for Soft Periodic Tasks Sedigheh Asiaban, Mohsen Ebrahimi Moghaddam, Maghsoud Abbaspur

Moreover, the relative deadline of each task was assumed equal to its Di = Pi , i = 1,2,...N ). All tasks started at time zero ( φi = 0, i = 1,2,..., N ). The was chosen randomly between 10 and The guaranteed execution time

normal functionality. Therefore, the miss ratio of each task should be the most important performance metric. In this subsection, a specific simulation experiment has been performed to identify the miss ratio behavior under the MMF, gEDF, RD-EDF, RLP and EDF. A task set of 5 periodic tasks was randomly generated with uniformly distributed periods in [10,100]. Timing characteristics of generated tasks are presented in Table 1.

τi

period (i.e. simultaneously period of tasks 100 time units.

eigrt for each task was

calculated using the equation (4) to guarantee the condition



N

∑i =1 ei

eigrt ≤1. Pi

L (Γ ) ≤ 1

eigrt =  1 e L(Γ) > 1 i 

Table 1. the period and average execution time of task set Γ = {τ 1 ,τ 2 ,...,τ 5 } for experiment 1, 2 and 3

(4)

Task number

 L (Γ )

Period

Also, the number of decision points of all tasks in RD-EDF assumed to be one ( ki = 0, i = 1,2,..., N ), therefore, decision point was the time instant at which the corresponding job started to overrun and the dropping probability DPRi for the task were set to

Pi

Average execution time

0.6 ( DPRi = 0.6, i = 1,2,..., N ). The reason of this selection was that results obtained in [5] showed that, according to the kind of execution time distribution (e.g., uniform or exponential), a single dropping point with a high dropping probability may be more effective than multiple dropping points with a lower dropping probability, and vice versa. The Gr parameter of gEDF algorithm set to 0.4 ( Gr = 0.4 ) because in many experiments in [20] this value has been verified, in addition by increasing the size of a group, gEDF achieves higher success rates but by setting the group range parameter to a large value, gEDF behaves more like SJF that cause more unfairness [20]. In addition, the skip parameter in RLP algorithm set to 6 for each task ( s i = 6 ).

ei

τ1

τ2

τ3

τ4

τ5

32

42

54

55

86

4

14

16

7

13

Figure 1. Miss ratio of MMF, gEDF, RD-EDF, RLP and EDF for each task in table 1

All the simulation results were obtained by performing each experiment 100 times over simulation time that was equal to 30000 time unit and average of results was reported. In the following, the performance results obtained from simulations under the various system load conditions are presented.

According to equation (3) average system load is equal to 1.04 ( L(Γ) = 1.04 ) in this table. These tasks were scheduled during 60000 time unit. Figure 1 shows the miss ratio that is introduced by the algorithms for each individual task in Table 1(tasks are ordered by increasing periods). The miss ratio is defined as the ratio of the total number of jobs for each task which miss their deadlines to the total number of released jobs for that task. It is worth observing that, MMF introduced same miss ratio for each task without considering the period or average execution of them, therefore it worked fairly. EDF, RLP and RD-EDF treated tasks less fairly because they were dependent to task periods. gEDF is also unfair, since it assigns

5.1 Experiment 1- The Comparison of Miss Ratio in MMF, gEDF, RD-EDF, RLP, and EDF Although a soft real-time task can tolerate a small percent of deadline misses, it usually requires a soft guarantee in term of miss ratio in order to maintain its

106

International Journal of Digital Content Technology and its Applications Volume 3, Number 4, December 2009 computed as the maximum variation with respect to all the jobs [22]. Because we consider soft real time systems, here the jitter is defined as "the maximum time variation in the occurrence of a particular event in different jobs of a task that successfully completed." Therefore, the relative output jitter (ROJ) (which hereafter called jitter) of a task is the maximum time variation between the finishing times of any two consecutive jobs that completed successfully. Then, relative output jitter ( ROJ i ) of task τ i is defined as

priority to tasks according to their periods and average execution times.

5.2 Experiment 2- Comparison of Consecutive Miss in MMF, gEDF, RD-EDF, RLP and EDF However, in soft real time systems missing a few jobs does not result in considerable displeasure, but too many jobs should not be missed consecutively. Therefore, maximum consecutive miss of each task should be as low as possible.

ROJ i = max | f i ,k +1 − f i ,k | k

(5)

k = 1,2,..., N isucc − 1 Where N isucc is the number of jobs of task are completed successfully, and

τi

that

f i ,k is defined in

section 3.1. In real-time applications, the jitter can be tolerated when it does not degrade the performance of the system. In many control applications, however, a high jitter can cause instability or a jerky behavior of the controlled system [23, 24]; hence it should be kept as low as possible. The reported results in Figures 3 and 4 show the jitter and jitter variance behavior under the MMF, gEDF, RD-EDF, RLP and EDF for task in table 1. In figure 3, the results refer to the relative output jitter (ROJ), which has been normalized with respect to task periods. Hence a value of 1 on task τ i corresponds to

Figure 2. Consecutive miss of MMF, gEDF, RDEDF, RLP and EDF for each task in Table 1

a jitter equal to its period Pi .

Figure 2 presents the maximum consecutive miss of each task in Table 1. As the plots show; the MMF performed better than other algorithms because it behaved more fairly and it had least consecutive miss in average.

5.3 Experiment 3- Jitter in MMF, gEDF, RDEDF, RLP and EDF Due to the presence of other concurrent tasks that compete for the processor, a task may evolve in different ways in each period; that is, the instructions of each job would be executed at different times. The maximum time variation (relative to the release time) in the occurrence of a particular event in different jobs of a task defines the jitter for that event. The jitter of an event of a task τ i is said to be relative if the variation

Figure 3. Normalized relative output jitter of MMF, gEDF, RD-EDF, RLP and EDF for each task in table 1

refers to two consecutive jobs of τ i , and absolute if it is

107

A Real-Time Scheduling Algorithm for Soft Periodic Tasks Sedigheh Asiaban, Mohsen Ebrahimi Moghaddam, Maghsoud Abbaspur

Figure 5. Miss ratio of MMF, gEDF, RD-EDF, RLP and EDF under various system loads

Figure 4- Variance of relative output jitter of MMF, gEDF, RD-EDF, RLP and EDF for each task in table 1

It is worth noting that, since gEDF algorithm tends to service smaller jobs, then more jobs can complete, intuitively gEDF should lead to a lowest success ratio than other algorithms. But, it does not always guarantee fairness.

As it is shown in figure 3, the normalized relative output jitter of MMF is almost better than other algorithms. This is because of MMF fairly behavior in miss ratio and consecutive miss. Also, figure 4 shows that jitter variance of gEDF is near EDF. But, this similarity becomes less in higher system loads.

5.5 Experiment 5- Comparison of Total Consecutive Miss Ratio of MMF, gEDF, RDEDF, RLP and EDF

5.4 Experiment 4- Comparison of Total Miss Ratio of MMF, gEDF, RD-EDF, RLP and EDF

Figure 6 shows the maximum of consecutive miss in task system related in section 5 at various system loads. As it is presented in figure 6 consecutive miss in the MMF is always lower than other algorithms.

Figure 5 present the miss ratio of the task system that was characterized in section 5 in different system loads. The miss ratio is defined as the ratio of the total number of jobs for all tasks which meet their deadlines to the total number of released jobs for all tasks. As it is shown, gEDF has generally a lowest miss ratio than other algorithm and then MMF has better miss ratio than EDF particularly when the system load increases.

Figure 6. Consecutive miss of MMF, gEDF, RDEDF and EDF, RLP under various system loads

108

International Journal of Digital Content Technology and its Applications Volume 3, Number 4, December 2009

5.6 Experiment 6- Comparison Total Jitter of MMF, gEDF, RD-EDF, RLP and EDF

System utilization is also an important metric because the main goal of a scheduling algorithm is to assign and manage system resources so that a good utilization is achieved. The system utilization is the sum of execution time of all jobs that completed successfully divided by the time interval during which scheduling occurs (i.e. simulation time).

The relative output jitter task system is defined to be largest relative output jitter on any task in :

ROJ (Γ) = max ROJ k , k = 1,2,..., N

(6)

k

Where N is the number of tasks in Γ . Figure 7 and 8 display the relative output jitter and jitter variance of task system that described in section 5 under various system loads. As is seen in the figures MMF preset lowest output jitter and jitter variance than other algorithms.

Figure 9. System utilization of MMF, gEDF, RDEDF, RLP and EDF under various system loads Figure 9 demonstrate the system utilization of MMF, gEDF, RD-EDF, RLP and EDF in different system loades. As Figure 9 shows, system utilization of MMF and gEDF is approximately the same. The system utilization of EDF is also same as MMF and

Figure 7. Relative output jitter of MMF, gEDF, RD-EDF, RLP and EDF under various system loads

gEDF when the average system load is low ( L ≤ 1 ), however, in overload condition system utilization of EDF rapidly decrease.

6. Conclusion and Future Work In this paper, we have proposed a new soft realtime scheduling algorithm, called Maximum Miss First (MMF) that determines priority of tasks according to their miss ratios. Also, proposed algorithm compared with the EDF algorithm and three recent works in this context (gEDF, RLP and RD-EDF). Performance metrics, which were used to compare these algorithm included system utilization, output jitter, miss ratio, and consecutive miss. Simulation results showed that MMF generally performed better than other algorithms, except, total miss ratio of gEDF was less than MMF. However, because of trend of gEDF to smaller jobs, it does not always guarantee fairness. In contrast, the MMF distribute miss ratio fairly between tasks, then it is appropriate for soft real time systems with same QoS requirements. Also, the overrun conditions as long as do not cause overload conditions

Figure 8. Variance of relative output jitter of MMF, gEDF, RD-EDF, RLP and EDF under various system loads

5.7 Experiment 7- Comparison of System Utilization of MMF, gEDF, RD-EDF, RLP and EDF

109

A Real-Time Scheduling Algorithm for Soft Periodic Tasks Sedigheh Asiaban, Mohsen Ebrahimi Moghaddam, Maghsoud Abbaspur have no affect on the MMF performance because it does not use the predefined burst time of tasks. The MMF algorithm same as EDF policy needs just absolute deadline of each job to be specified as a priori information, but, gEDF, RLP and RD-EDF require the execution time of each jobs and guaranteed execution time respectively. The time complexity of MMF is same as EDF. As a future work, in order to extend the proposed algorithm to more general situations, we plan to embed a new parameter that shows the importance of tasks. Other future works that we would take into account include an analytical study to verify the better performance achieved by conducting our novel algorithm and evaluate MMF in real environments.

Applications Symposium, pp. 164–173, Chicago, Illinois, 1995. [11]. Sprunt B., Sha L., and Lehoczky J.P., Aperiodic task scheduling for hard real-time systems, Journal of RealTime Systems, Vol. 1, pp. 27–60, 1989. [12]. Deng Z., Liu J.W., and Sun J., A scheme for scheduling hard real-time applications in open system environment, Proceedings of the 9th Euromicro Workshop on RealTime System, pp. 191–199, Toledo, Spain, 1997. [13]. Spuri M., Buttazzo G., and Sensini F., Robust aperiodic scheduling under dynamic priority systems, Proceedings of the 17th Real-Time System Symposium, pp. 210– 219, 1996. [14]. Atlas AK and Bestavros A., Statistical rate monotonic scheduling, Proceedings of the 19th IEEE real-time systems symposium, Madrid, Spain, 1998. [15]. Ramanathan P, Overload management in real-time control applications using (m,k)-firm guarantee, IEEE Transactions on Parallel and Distributed Systems, Vol. 10, No. 6, pp. 549–59, 1999. [16]. Liu JWS, Lin K., Shin W., Chuang-shi YuA, Chung JY and Zhao W., Algorithms for scheduling imprecise computations, IEEE Computer, Vol. 24, No. 5, pp. 58– 68, 1991. [17]. Abeni L., Buttazzo G., Integrating multimedia applications in hard real-time systems. Proceedings of the 19th IEEE real-time systems symposium, Madrid, Spain, 1998. [18]. Caccamo M., Buttazzo G. and Sha L., Capacity sharing for overrun control, Proceedings of the 20th IEEE realtime systems symposium, Orlando, FL, US, 2000. [19]. Sabeghi M. and Naghibzadeh M., A Fuzzy algorithm for real-time scheduling of soft periodic tasks, International Journal of Computer Science and Network Security, Vol. 6, No.2, 2006. [20]. Wenming Li, Krishna Kavi and Robert Akl, A nonpreemptive scheduling algorithm for soft real-time systems, Computers & Electrical Engineering, Vol. 33, No. 1, pp. 12-29, 2007. [21]. Kuo TW, Yang WR, Lin KJ. A class of rate-based realtime scheduling algorithms. IEEE Transactions on Computers, Vol. 51, No. 6, pp. 708–20, 2002. [22]. Buttazzo G. and Cervin A., Comparative assessment and evaluation of jitter control methods, Proceedings of the 15th International Conference on Real-Time and Network Systems, Nancy, France, 2007. [23]. Marti P., Fohler G., Ramamritham K., and Fuertes J. M., Control performance of flexible timing constraints for Quality-of-Control Scheduling, Proceedings of the 23rd IEEE Real-Time System Symposium. Austin, TX, USA, 2002. [24]. Asiaban S., Ebrahimi Moghaddam M., IVJ: a soft realtime scheduling algorithm, Proceedings of the 14th International Conference on Distributed Multimedia Systems, Boston, USA, 2008. [25]. Lu C, Stankovic JA, Tao G, Son SH. Design and evaluation of a feedback control EDF scheduling

7. References [1]. Ramamritham K. and Stankovic J.A., Scheduling algorithms and operating systems support for real-time systems, Proceedings of the IEEE, Vol. 82, No. 1, pp. 55--67, January 1994. [2]. Zhu K., Zhuang Y. and Viniotis Y., Achieving end-toend delay bounds by EDF scheduling without traffic shaping, Proceedings of the 20th Annual Joint Conference on the IEEE Communications Societies 3: 1493- 1501, 2001. [3]. Krishna C. M. and Kang G.S., Real-time System, McGraw-Hill, 1997. [4]. Gardner MK, Liu JWS, Performance of algorithms for scheduling real-time systems with overrun and overload, Proceedings of the 11th Euromicro conference on realtime systems, ECRTS 99, York, England, 1999. [5]. Bello L.L., Kim K., Overrun handling approaches for overload-prone soft real-time systems, Advances in Engineering Software, Vol. 38, pp. 780–794, 2007. [6]. Asiaban S. and Ebrahimi Mogaddam M., A framework for bandwidth allocation in multimedia to guarantee QoS, Proceedings of the 21th International Conference on Parallel and Distributed Computing and Communication Systems, 2008. [7]. Liu C.L. and Layland J. W., Scheduling algorithms for multiprogramming in a hard real-time environment, Journal of the Association for Computing Machinery, Vol. 20, No. 1, pp. 46–61, 1973. [8]. Leung J. and Whitehead J., On the complexity of fixed priority scheduling of periodic, real-time tasks, Performance Evaluation, Vol. 2, pp. 237–250, 1982. [9]. Yoo M.R., Ahn B.,.Lee D.H. and Kim H.C., A new realtime scheduling algorithm for continuous media tasks, Proceedings of the IEEE Pacific Rim Conference on Communications, Computers and signal Processing, Vol. 2, pp. 417 - 420, 2001. [10]. Tia T.S., Deng Z., Shankar M., Storch M., Sun J., Wu L.C., and Liu J. W., Probabilistic performance guarantee for real-time tasks with varying computation times, Proceedings of the IEEE Real-Time Technology and

110

International Journal of Digital Content Technology and its Applications Volume 3, Number 4, December 2009 algorithm. Proceedings of the 20th IEEE real-time systems symposium, RTSS’99. Phoenix, AZ; 1999. [26]. Audrey Marchand, Maryline Chetto, Quality of Service Scheduling in Real-Time Systems, Int. J. of Computers, Communications & Control, ISSN 1841-9836, E-ISSN 1841-9844, Vol. III (2008), No. 4, pp. 353-365.

111