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

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 CPUUtilization (ECU), Failure Ratio (FR), andMaximumTardiness 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.


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.

Real Time System (RTS)
. RTS is a system in which execution of tasks has some time restrictions (deadline) [1][2][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].

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][10][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  UB 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.

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.(

Real Time
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.

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 if  utilization ≤ 1. ( Let us consider the following examples that explain the behavior of EDF in overloading case in both single and multiple processors (distributed computing).

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  3 is shorter than the task  2 and therefore newly arrived task  3 preempts  2 task because  2 task has missed the deadline.

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,  utilization is 0.45 which qualifies the acceptance test of schedulability but due to task utilization  utilization becomes 1.15 which is greater than 1.Due to the arrival of this third task  1 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 ( utilization < 1).In the above example  2 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).
The task is schedulable and (4) assign  priority of task on given processor (5) Else task is non-schedulable END EDF scheduling algorithm in distributed system BEGIN (1) then task is schedulable and assign  priority of task on given processor (4) Else migrate the task (5) Else task is non-schedulable END Algorithm 1 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] iff where  is total number of tasks

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  UB for any number of tasks (as the number of processors increases towards infinity), the value of  UB remains 0.6931472035974151.This means that Lim 0.693 ≤  utilization ≤ 1 but after the arrival of 3rd task  utilization becomes 1.15 which is greater than 1.Acceptance test of RM shows that any task-set is able to schedule through if  utilization ≤ 0.693, but not all tasks can be scheduled if 0.693 <  UB ≤ 1 [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  period .In Figure 5 tasks priority is in order  1 >  2 >  3 and also according to Table 4 the execution of third task  3 is doubtful.Hence, each new arrival of  1 after every periodic cycle preempts task  2 or  3 .Similarly task  2 preempts  3 .Also the arrival of 3rd task exceeds  utilization > 1 and its priority is also third.As a result,  3 has missed its deadline.Therefore, we can say that tasks containing the east priority fail to meet the deadline in overloading situation.
task is schedulable and assign  priority of task on given processor (4) Else task is non-schedulable END RM scheduling algorithm in Distributed system BEGIN (1) then task is schedulable and assign  priority of task on given processor (4) else migrate the task (5) Else task is non-schedulable END Algorithm 2

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

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].

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 (2 1/ − 1), 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.

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.

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 The task is ready for execution (5) Else (6) Task Migration (task, tasku)

Taskmigration(task, tasku) // Task Migration on the basis of a processor utilization factor
(1) Sort all processor utilization (2) Assign task to the processor having least a utilization factor (3) PQueue(task); END Algorithm 3: Joint EDF-RM scheduling algorithm.

1
Hard/soft real time task frame format under D O EDF

Static priority
Tasks with static priority 1 expected to miss the deadline are allowed to execute task.

Firm real time task frame format under D O EDF
Tasks with static priority 0 expected to miss the deadline will be discarded from the system.

𝜏 arrival
wcet  period  dline  arrival  wcet  period  dline 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  period ≥  dline .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  utilization +∑ −1 =1   utilization ≤ ×(2 1/ − 1) will be easily executable or if  utilization + ∑ −1 =1   utilization ≤  × (2 1/ − 1) ≤ 1, 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  1 processor utilization is  1 utilization =   utilization +  2 utilization +  3 utilizaion +  (−2) utilization = 0.61 ≤ 0.810, And after the arrival of  −1 processor utilization becomes  1 utilization +  (−1) utilization = 0.70 ≤ 0.810, but arrival of   reaches utilization towards  1 utilization +  () utilization ≥ 0.810 < 1. Arrival of further tasks will increase  1 utilization 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. 2 processor is a destination node given in Figure 9.  utilization.We are considering here  deadline ≤  period .

Theorem 1. If the upper bound of global task queue is 𝑛×(2
There are 4 processors present in our RTDS with  1 utilization ,  2 utilization ,  3 utilization , and  4 utilization 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  1 task assigned to the randomly  selected processor  2 whose  2 utilization < 1, and after the assignment of  1 , two conditions can occur: 2 utilization + 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  utilization ≤ 1.
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).
Tasks having ∑  =1   utilization ≤  × (2 1/ − 1) are allowed to execute on assigned processors.As we know the value of According to RM scheduling, every task is schedulable if its  utilization ≤  × (2 1/ − 1), but its execution is doubtful if it is in between  × (2 1/ − 1) and 1.Therefore, here queue allows only those tasks for further execution whose  utilization ≤  × (2 1/ − 1).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  × (2 1/ − 1), then overloading of processor is reduced.

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).

Average CPU Utilization (𝐴 𝜌 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 ( wcet ) and interarrival period ( period ) of tasks as well.Additionally, the  wcet and  period 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   utilization of 8 processors for 300 tasks is 0.16338866 and on the other side for 10 processors it is 0.4004137.Similarly, In EDF   utilization 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   utilization because of migration threshold limit of all processors along with the boundary limit of global task queue.

Success Ratio (SR). Consider SR =
Successfully scheduled tasks Total number of tasks arrival .
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.

Failure Ratio (FR). Consider FR =
Tasks miss the deadline Total number of tasks arrival .
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.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.

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.

Figure 6 :
Figure 6: Real time tasks frame format according to D O EDF scheduling algorithm.

Figure 13 :
Figure 13: Number of transactions versus Maximum Tardiness on 8 and 10 processors.

Table 1 :
Symbols and definitions.
[20]ic 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  = { 1 ,  2 ,  3 ,  4 ,  5 , . . .,   } arriving on processor .Hence,

Table 4 :
Shows some values of  UB on different number of tasks .