Journal of Engineering

Volume 2014, Article ID 485361, 13 pages

http://dx.doi.org/10.1155/2014/485361

## Performance Evaluation of New Joint EDF-RM Scheduling Algorithm for Real Time Distributed System

Department of Computer Science & Engineering and Information & Communication Technology, Jaypee University of Information Technology, Waknaghat, Solan, Himachal Pradesh 173234, India

Received 27 May 2013; Accepted 25 November 2013; Published 22 January 2014

Academic Editor: WaiKeung Wong

Copyright © 2014 Rashmi Sharma and Nitin. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

In Real Time System, the achievement of deadline is the main target of every scheduling algorithm. Earliest Deadline First (EDF), Rate Monotonic (RM), and least Laxity First are some renowned algorithms that work well in their own context. As we know, there is a very common problem Domino's effect in EDF that is generated due to overloading condition (EDF is not working well in overloading situation). Similarly, performance of RM is degraded in underloading condition. We can say that both algorithms are complements of each other. Deadline missing in both events happens because of their utilization bounding strategy. Therefore, in this paper we are proposing a new scheduling algorithm that carries through the drawback of both existing algorithms. Joint EDF-RM scheduling algorithm is implemented in global scheduler that permits task migration mechanism in between processors in the system. In order to check the improved behavior of proposed algorithm we perform simulation. Results are achieved and evaluated in terms of Success Ratio (SR), Average CPU Utilization (ECU), Failure Ratio (FR), and Maximum Tardiness parameters. In the end, the results are compared with the existing (EDF, RM, and D_R_EDF) algorithms. It has been shown that the proposed algorithm performs better during overloading condition as well in underloading condition.

#### 1. Introduction and Motivation

Real Time Distributed System is a distributed system with real time properties. We can say that RTDS is a combination of RTS and distributed system (Figure 1). Properties of real time tasks are applied on the distributed system or concept of a distributed system is implemented on RTS. The following is the first appearance of two main components of RTDS.

##### 1.1. Real Time System (RTS)

RTS is a system in which execution of tasks has some time restrictions (deadline) [1–3]. Based on the execution of real time task RTS falls into the following categories.(i)*Hard RTS.* Task execution by assigning deadline is restrictive. Missing deadline will produce incurable results for the entire system [4].(ii)*Soft RTS.* Although missing deadline is not enviable in RTS, but in soft RTS tasks could miss some deadline that will not affect the working of system [5].(iii)*Firm RTS.* If tasks complete their execution before the deadline, they gain more rewards [4, 6]. It is a special type of soft RTS.

EDF, RM, and Least Laxity First are some basic scheduling algorithms that execute real time tasks on the basis of their deadline, interarrival period, tardiness, and so forth. Every scheduling algorithm is having some drawbacks, for example, EDF is not functioning well in overloading condition and RM in underloading condition [7, 8].

##### 1.2. Distributed System (DS)

Distributed system is an arrangement of several processors/nodes followed by some interconnection topologies. The distribution of load to various processors increases the performance of the entire system. In DS, on the basis of nodes utilization load is balanced in between processors [9–11]. Task migration and duplication are two methodologies that help in balancing the processor load.(i)*Load Migration. In order to balance the load of DS task migration methodology relocates the victim task from one processor (source) to another processor (destination).* This technique can be applied to dependent (DAG) as well as independent tasks [12, 13].(ii)*Task Duplication. Task duplication method is given on the basis of computation to communication ratio (CCR) in between processors.* This technique is mostly applicable on dependent tasks (DAG) in order to balance the load as well as minimize the execution cost of complete DAG [14, 15].

Moreover, Tasks in a distributed system are assigned to processors by using the following schedulers (Figure 2).(i)*Partitioned Scheduler.* Tasks are mapped to processors deterministically for execution. Scheduler statically assigns tasks to processors and migration of task instance is prohibited here [16, 17].(ii)*Global Scheduler. All tasks are kept in a global queue from where tasks to other processors will be assigned for the death penalty.* This scheduler dynamically assigns tasks to nodes and allows task migration in between processors [17, 18]. Global scheduler is appealing in such systems where average as well as the worst case response time (WCRT) is important. In queuing theory, single queue scheduling generates healthier average response time as compared to queue per processing scheduler [17, 19]. Hence, in RTDS this scheduler is superior to partitioned scheduler.

In this paper we have explained a new joint EDF-RM scheduling algorithm which behaves optimally in both circumstances (underloading as well as overloading). Here, the utilization bound of RM is used to boundary limit of the global queue instead of processors and tasks will be assigned to randomly selected processors. Moreover, for the execution of tasks the EDF scheduling is used on every processor. Our proposed algorithm is divided into the following two modules:(a)real time job assignment in distributed system (using global scheduler);(b)real time task execution on allotted processors of distributed system (including task migration).

Reason behind using RM utilization bound is to safeguard our system from overloading condition. Additionally, in order to deal dynamically with tasks the EDF scheduling algorithm is implemented. Load balancing in RTDS is availed by using the global scheduler because task migration is permissible in this scheduler.

The remainder of the paper is organized as follows. Existing real time scheduling algorithms have been discussed in Section 2. Section 3 explains the proposed joint EDF-RM scheduling algorithm. In Section 4, performances of EDF, RM, D_O_EDF, and D_R_EDF [8] along with proposed algorithm have been analyzed with simulation results. Finally, the conclusion is presented in Section 5.

Before moving towards the next section, let us have a glance on the symbols that are utilized in the entire composition. Table 1 demonstrates these symbols and their denotation.

#### 2. Preliminaries and Background

Before giving the elucidation of our proposed work we would like to enlighten scheduling algorithms associated with our work. This paper uses RM and EDF scheduling algorithms together and tries to resolve the downside of EDF (Domino’s effect) and RM as well. As we know that in distributed system load balancing is an important issue. Hence, proposed algorithm also amplifies the working capability in overloading or underloading situations. These above stated two situations (loading conditions) are checked by recalculations of per task/processor utilization.

##### 2.1. Real Time Schedulers

Tasks having real time properties and scheduled on RTS are real time tasks. Scheduling is done by two types of scheduler modules.(i)*Dynamic Scheduler. *Dynamic scheduler assigns priorities to tasks at run time. This scheduler reevaluates the information like priorities, resource availability after the arrival of current task. Due to the dynamism of tasks priority, already running tasks have to be preempted by the arrival of new task [20].(ii)*Static Scheduler.* Under this scheduler, priorities of tasks are predefined or we can say static. It cannot be altered by the arrival of new tasks. Priority of , where . Generally, this scheduler works on dependent tasks because communication cost in between tasks is reduced [20].

Let us consider that is a set of real time tasks arriving on processor . Hence,

RTS works with dynamic as well as static tasks. The EDF scheduling algorithm works well with dynamic and RM schedule static tasks efficiently. We are dealing with RTDS in this paper; therefore we consider the case of overloading in each case.

##### 2.2. Earliest Deadline First Scheduling Algorithm

EDF is a dynamic scheduler that follows the principle: the nearer the deadline the higher the priority of task [21, 22]. It assigns priorities to tasks dynamically. Consider

Before assigning the priorities to the task, scheduler first checks the acceptance test by inspecting the utilization value of task as well as processor. Here task-set is schedulable

Let us consider the following examples that explain the behavior of EDF in overloading case in both single and multiple processors (distributed computing).

###### 2.2.1. Example of EDF in Uniprocessor

As we have mentioned in Algorithm 1 and Table 2 the arrival of new tasks preempts already running tasks. In Figure 3 the deadline of task is shorter than the task and therefore newly arrived task preempts task because task has missed the deadline.

###### 2.2.2. Example of EDF in Distributed System

In case of distributed system, overloaded processor can migrate the victim task to other processors (destination processor) [23].

According to Table 3 and Figure 4, is 0.45 which qualifies the acceptance test of schedulability but due to task utilization becomes 1.15 which is greater than 1. Due to the arrival of this third task becomes overloaded and future tasks will also miss their deadline. Therefore, by applying the migration terminology scheduler checks per processor utilization and migrate victim task to the processor having a time slot for its execution (). In the above example has available time slot and its utilization is also less than 1. In distributed system there is some migration cost , that is, time taken by task to migrate from one processor (source) to another (destination).

##### 2.3. Rate Monotonic Scheduling Algorithm

RM scheduling algorithm comes under static scheduler (static priority) and follows the principle: the shorter the interarrival period the higher the priority of task [23, 24]:

Before assigning the priorities to the task, scheduler first checks the acceptance test by inspecting the utilization value of task as well as processor. For this algorithm task-set is schedulable on a given processor [25] where is total number of tasks

###### 2.3.1. Example of RM in Uniprocessor

Now next is the implementation of RM scheduling algorithm on the data of Table 2. In overloading condition neither EDF nor RM performs well [7].

The upper bound of RM represents schedulability bound of the number of tasks, and as increases, it decreases with (number of jobs). While we compute for any number of tasks (as the number of processors increases towards infinity), the value of remains 0.6931472035974151. This means that but after the arrival of 3rd task becomes 1.15 which is greater than 1. Acceptance test of RM shows that any task-set is able to schedule through if , but not all tasks can be scheduled if [7]. Therefore, we can say that all tasks may or may not be scheduled by RM.

In addition, in case of RM, tasks having the least priority miss the deadline due to preemption of higher priority tasks in overloading case, since RM assigns priorities statically (priority of task will not change throughout the execution process) on the basis of . In Figure 5 tasks priority is in order and also according to Table 4 the execution of third task is doubtful. Hence, each new arrival of after every periodic cycle preempts task or . Similarly task preempts . Also the arrival of 3rd task exceeds and its priority is also third. As a result, has missed its deadline. Therefore, we can say that tasks containing the east priority fail to meet the deadline in overloading situation.

###### 2.3.2. Example of RM in Real Time Distributed System

As we have computed that arrival of 3rd task exceeds the range of , therefore in task is a victim task that initiates overloading situation in its source processor. Initially processor is idle and is 0.75. Therefore, on the basis of utilization criteria becomes a destination processor for giving victim task and it will be executed on processor. After the arrival of migrated task in , its utilization becomes 0.45 and its priority is 1, but after the arrival of task becomes 0.95 which is again greater than 0.693. In our given example ; therefore RM behaves like EDF but if , then RM behaves different than EDF.

##### 2.4. D_O_EDF and D_R_EDF Scheduling Algorithm

The main motive behind the derivation of these two scheduling algorithms is Domino’s effect problem of EDF that is created only in overloading condition. We keep in our mind that we should not let the processor shoot in such a way that causes Domino’s effect.

The D_O_EDF scheduling algorithm assigns static priorities 0 and 1 to jobs (Figure 6). Such static priorities will be used in overloading condition. In overloading condition, this scheduling algorithm discards those tasks that are expected to miss the deadline and their static priority is 0. On the other side, tasks with firm timing constraint and are expected to miss the deadline with static priority 1, are allowed to execute [8].

The D_R_EDF scheduling algorithm is an amalgamation of both dynamic and static scheduling algorithms, that is, EDF and RM (Figure 7). As we know, EDF is working well in underloaded situation, but its performance reduces exponentially in overloading condition. Similarly, RM behaves normally in underloaded condition but performs well in overloaded situation. Hence, according to given algorithm initially processor uses EDF for task execution, but when tasks start missing deadline due to overloading condition, the scheduler switches towards RM algorithm. As tasks continuously meet the deadline, then it means that the system is in underloaded condition now and then scheduler again switches towards EDF algorithm [8].

#### 3. Proposed Joint EDF-RM Scheduling Algorithm

##### 3.1. The Algorithm

This proposed algorithm is a combination of RM and EDF scheduling algorithms. As we knows in RM the upper bound of processor is computed by , where is a number of tasks. In our proposed algorithm this upper bound of RM will be a boundary limit of global task queue of global scheduler. If cumulative utilization of tasks is less than or equal to will distribute towards randomly selected processors of the system for execution, otherwise that task will be discarded.

The second scheduling algorithm EDF is working for the execution of assigned tasks on a particular processor. The positive side of using global scheduler is permitted to task migration in between processors. Figure 9 explains the task migration methodology in between processors.

##### 3.2. Joint EDF-RM Scheduling Algorithm

Proposed Joint EDF-RM scheduling algorithm is divided into following three modules:(1)maintenance of global task queue(2)execution of assigned tasks on allotted processors(3)migration of tasks in between processors if needed (if overloading alarm generates).

Following Algorithm 3 explains all above-stated three modules.

##### 3.3. Significance of the Above-Stated Proposed Algorithm

System assumed here is loosely coupled distributed system in which all processors share identical architecture (homogeneous RTDS). Threshold limit of each processor is fixed and in order to execute the tasks, the Earliest Deadline First (EDF) scheduling is employed by every processor. In given system all tasks are independent and their . Based on the priority of task, higher priority job can preempt the lower priority task. One central scheduler (global scheduler) is used that maintains the global task queue for the entire system. As we recognize that global scheduler allows task migration in between processors, therefore for every processor we have set one utilization threshold value that generates alarms for migration of task. This entire system deals with soft as well as firm real time tasks.

In Figure 8, there is a global scheduler that maintains a waiting task queue globally. In order to avoid the problem of overloading, limited amount of tasks arrives on the queue and its boundary limit is determined by using a RM scheduling algorithm. Tasks having will be easily executable or if , then not all tasks will be executable.

As the queue behaves on the basis of first in first out, tasks are randomly assigned to processors. Each processor executes tasks by using an EDF scheduling algorithm. Small change we have done in this existing algorithm is migration threshold limit. This migration threshold limit decides the migration of task from given processor. In Figure 9 processor utilization is , And after the arrival of processor utilization becomes , but arrival of reaches utilization towards . Arrival of further tasks will increase by 1; after that, all tasks start missing deadline which causes a Domino effect. After migration threshold alarm, processor checks the utilization values of other processors. And then migrate the task to the processor having the least utilization. processor is a destination node given in Figure 9.

Theorem 1. *If the upper bound of global task queue is , then overloading of processor is reduced.*

*Proof. *Given set of aperiodic tasks arrives in a global task queue, whose periods and execution times are and , , respectively. are per task utilization. We are considering here . There are 4 processors present in our RTDS with , , , and being their respective utilizations. Global scheduler randomly selects processors for the allocation of tasks but tasks, follow FCFS discipline for allocation.

We are taking three cases in order to proof given theorem*Case I.* Global queue has infinite limit as the global queue is containing no acceptance test of task. Without checking its utilization, based on FCFS task assigned to the randomly selected processor whose , and after the assignment of , two conditions can occur:

In this case there are more chances of overloading on every processor. *Case II. *Boundary limit of global queue is 1, that is, .

Here only those tasks are allowed to enter in a global task queue whose .

If tasks in a queue are waiting for an assignment and the arrival of new task increases the boundary limit by 1, then all upcoming tasks will not be allowed for admission:

In this case (7) is satisfied only on 1st condition; that is,

This case gives a guarantee of schedulability of every task. Equations (8) and (9) behave similar to 1st case. The limitation of the EDF scheduling algorithm is that if one task starts missing deadline, then upcoming tasks also miss deadline continuously (Domino’s effect).*Case III.* Global queue has boundary limit .

Tasks having are allowed to execute on assigned processors. As we know the value of

According to RM scheduling, every task is schedulable if its , but its execution is doubtful if it is in between and 1. Therefore, here queue allows only those tasks for further execution whose . Consider
After the allocation of tasks on the processor, it will execute tasks by using EDF:
But in 3rd case very rare tasks utilization reaches 1 but not beyond 1. Hence, we can say that if the upper bound of global task queue is , then overloading of processor is reduced.

#### 4. Performance Analysis and Simulation Results

In order to evaluate our proposed scheduling algorithm we have used Eclipse Java EE IDE. The operation of the proposed study is measured by calculating the Average CPU Utilization, Success Ratio, Failure Ratio, and Maximum Tardiness. The simulation is done with more than 26000 transactions on 10 processors of RTDS, but in simulation results we have mentioned transactions up to 2100. Before making the demonstration of calculating simulation results, let us discuss those parameters that determine the performance of joint EDF-RM scheduling algorithm with some existing algorithms (EDF, RM, D_O_EDF, and D_R_EDF).

##### 4.1. Average CPU Utilization ()

It is defined as where the number of processors () varies from 1 to .

In Figure 10, the CPU utilization in proposed joint EDF-RM scheduling algorithm is lesser than the other three algorithms. As (1) explains, processor utilization is dependent on particular tasks utilization and further tasks utilization is dependent on the worst case execution time () and interarrival period () of tasks as well. Additionally, the and are generated randomly in given simulation. Due to all these factors of real time tasks the Average CPU Utilization can vary from time to time. For example, in Figure 10 of 8 processors for 300 tasks is 0.16338866 and on the other side for 10 processors it is 0.4004137. Similarly, In EDF of 8 processors for 2100 tasks is 3.287974 whereas for 10 processors it is 3.0410550. Hence, the value of Average CPU Utilization is uncertain, but as compared to previous existing algorithm, proposed joint EDF-RM algorithm gives better because of migration threshold limit of all processors along with the boundary limit of global task queue.

##### 4.2. Success Ratio (SR)

Consider

Meeting with the deadline is very imperative for all real time tasks; therefore we have computed success ratio that tells the percentage of successful implementation of tasks from total transactions.

After simulating thousands of tasks, we find that EDF, RM and D_R_EDF scheduling algorithms’ Success ratio can vary however we sometimes find that our proposed algorithm has a higher Success Ratio than the existing algorithms (Figure 11). Reason behind its best performance is a threshold value of task migration.

##### 4.3. Failure Ratio (FR)

Consider

This parameter computes the other side of coin, that is, percentage of those tasks which are unable to meet the deadline. Missing deadline is also a big task in front of all algorithms (Figure 12). Therefore, we also compute the Failure Ratio that tells us the occurrence of missing deadline.

##### 4.4. Maximum Tardiness

As we know, tardiness is the lateness occurring in tasks execution; that is,

While missing a deadline, we have computed the time after which task successfully executes. Figure 13 explains that the proposed algorithm has Minimum Tardiness compared to existing algorithms.

#### 5. Conclusion and Future Work

Proposed scheduling algorithm is the combination of EDF and RM scheduling algorithms that rise above the overloading problem of any processor. We have set the threshold limit 0.81 that generates alarm for the migration of upcoming tasks because overloading on task is restricted. We simulate this work for homogeneous system; in the future we will implement it on heterogeneous arrangement. One main problem occurs when running tasks are preempted by higher priority new tasks because running tasks miss the deadline. Hence, in future we will work on preemption technique of scheduling algorithms with fault tolerant techniques.

#### Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

#### References

- J. W. S. Liu,
*Real-Time Systems*, Pearson Education, New Delhi, India, 2003. - P. Li and B. Ravindran, “Fast, best-effort real-time scheduling algorithms,”
*IEEE Transactions on Computers*, vol. 53, no. 9, pp. 1159–1175, 2004. View at Publisher · View at Google Scholar · View at Scopus - C. L. Liu and J. W. Layland, “Scheduling algorithms for multiprogramming in hard real-time environment,”
*Journal of the ACM*, vol. 20, no. 1, pp. 46–61, 1973. View at Google Scholar - J. A. Stankovic and K. Ramamritham,
*Tutorial Hard Real-Time Systems*, IEEE Computer Society Press, 1988. - M. Joseph,
*Real-Time Systems: Specification, Verification and Analysis*, Prentice Hall, New York, NY, USA, 1996. - P. A. Laplante,
*Real-Time Systems Design and Analysis: An Engineer Handbook*, IEEE Computer Society, IEEE Press, 1993. - G. C. Buttazzo, “Rate monotonic versus EDF: judgment day,”
*Real-Time Systems*, vol. 29, no. 1, pp. 5–26, 2005. View at Publisher · View at Google Scholar · View at Scopus - A. Shah and K. Kotecha, “Efficient scheduling algorithms for real-time distributed systems,” in
*Proceedings of the 1st International Conference on Parallel, Distributed and Grid Computing (PDGC '10)*, pp. 44–48, Solan, India, October 2010. View at Publisher · View at Google Scholar · View at Scopus - G. Coulouris, J. Dollimore, T. Kindberg, and G. Blair,
*Distributed Systems: Concepts and Design*, Addison-Wesley, New York, NY, USA, 5th edition, 2011. - S. Dhakal, M. M. Hayat, J. E. Pezoa, C. Yang, and D. A. Bader, “Dynamic load balancing in distributed systems in the presence of delays: a regeneration-theory approach,”
*IEEE Transactions on Parallel and Distributed Systems*, vol. 18, no. 4, pp. 485–497, 2007. View at Publisher · View at Google Scholar · View at Scopus - R. Sharma and Nitin, “Optimal method for migration of tasks with duplication,” in
*Proceedings of the 14th International Conference on Modelling and Simulation*, pp. 510–515, 2012. - T. T. Y. Suen and J. S. K. Wong, “Efficient task migration algorithm for distributed systems,”
*IEEE Transactions on Parallel and Distributed Systems*, vol. 3, no. 4, pp. 488–499, 1992. View at Publisher · View at Google Scholar · View at Scopus - R. Sharma and Nitin, “Task migration with EDF-RM scheduling algorithms in distributed systems,” in
*Proceedings of the Internation Conference on Advances in Computing and Communications*, pp. 182–185, 2012. - S. Darbha and D. P. Agrawal, “A task duplication based scalable scheduling algorithm for distributed memory systems,”
*Journal of Parallel and Distributed Computing*, vol. 46, no. 1, pp. 15–27, 1997. View at Publisher · View at Google Scholar · View at Scopus - R. Sharma and Nitin, “Duplication with task assignment in mesh distributed system,” in
*Proceedings of the World Congress on Information and Communication Technologies (WICT '11)*, pp. 672–676, Mumbai, India, December 2011. View at Publisher · View at Google Scholar · View at Scopus - N. Fisher, S. Baruah, and T. P. Baker, “The partitioned scheduling of sporadic tasks according to static-priorities,” in
*Proceedings of the 18th Euromicro Conference on Real-Time Systems (ECRTS '06)*, pp. 118–127, Dresden, Germany, July 2006. View at Publisher · View at Google Scholar · View at Scopus - T. P. Baker, “A comparison of global and partitioned EDF schedulability tests for multiprocessor,” TR-051101, 2005.
- M. Bertogna, M. Cirinei, and G. Lipari, “Schedulability analysis of global scheduling algorithms on multiprocessor platforms,”
*IEEE Transactions on Parallel and Distributed Systems*, vol. 20, no. 4, pp. 553–566, 2009. View at Publisher · View at Google Scholar · View at Scopus - L. Kleinrock,
*Queueing Systems—Volume 2: Computer Applications*, Wiley-Interscience, New York, NY, USA, 1976. - A. Gantman, P. N. Guo, J. Lewis, and F. Rashid, “Scheduling real-time tasks in distributed systems: a survey,” 1998.
- O. U. P. Zapata and P. M. Alvarez, “Edf and RM multiprocessor scheduling algorithms: survey and performance evaluation,” Seccion de Computacion Av. IPN, 2508, 2005.
- K. Ramamritham, J. A. Stankovic, and P. F. Shiah, “Efficient scheduling algorithms for real-time multiprocessor systems,”
*IEEE Transactions on Parallel and Distributed Systems*, vol. 1, no. 2, pp. 184–194, 1990. View at Publisher · View at Google Scholar · View at Scopus - J. H. Anderson, V. Bud, and U. C. Devi, “An EDF-based restricted-migration scheduling algorithm for multiprocessor soft real-time systems,” in
*Proceedings of the 17th Euromicro Conference on Real-Time Systems (ECRTS '05)*, pp. 199–208, July 2005. View at Publisher · View at Google Scholar - J. Lehoczky, L. Sha, and Y. Ding, “Rate monotonic scheduling algorithm: exact characterization and average case behavior,” in
*Proceedings of the Real-Time Systems Symposium*, pp. 166–171, December 1989. View at Scopus - V. N. Darera and L. Jenkins, “Utilization bounds for RM scheduling on uniform multiprocessors,” in
*Proceedings of the 12th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA '06)*, pp. 315–321, Sydney, Australia, August 2006. View at Publisher · View at Google Scholar · View at Scopus