Analysis of Hierarchical Diff-EDF Schedulability over Heterogeneous Real-Time Packet Networks

: Packet networks are currently enabling the integration of traffic with a wide range of characteristics that extend from video traffic with stringent QoS requirements to the best-effort traffic requiring no guarantees. QoS guarantees can be provided in conventional packet networks by the use of proper packet scheduling algorithms. As a computer revolution, many scheduling algorithms have been proposed to provide different schemes of QoS guarantees with Earliest Deadline First (EDF) as the most popular one. With EDF scheduling, all flows receive the same miss rate regardless of their traffic characteristics and deadlines. This makes the standard EDF algorithm unsuitable for situations in which the different flows have different miss rate requirements since in order to meet all miss rate requirements it is necessary to limit admissions so as to satisfy the flow with the most stringent miss rate requirements. In this paper, we propose a new priority assignment scheduling algorithm, Hierarchal Diff-EDF (Differentiate Earliest Deadline First), which can meet the real-time needs of these applications while continuing to provide best effort service to non-real time traffic. The Hierarchal Diff-EDF features a feedback control mechanism that detects overload conditions and modifies packet priority assignments accordingly. To examine our proposed scheduler model, we introduced our attempt to provide an exact analytical solution. The attempt showed that the solution was apparently very complicated due to the high interdependence between the system queues' service. Hence, the use of simulation techniques seems inevitable. The simulation results showed that the Hierarchical Diff-EDF achieved the minimum packet average delay when compared with both EDF and Diff-EDF schedulers.


INTRODUCTION
Recently, many applications of computer networks rely on the ability of the network to provide Quality of Service (QoS) guarantees. These guarantees are usually bounded in the form of delay, bandwidth, packet loss rate and buffer utilization or a combination of these parameters. Furthermore, packet networks are currently enabling the integration of traffic with a wide range of characteristics that extend from video traffic with stringent QoS requirements to ``best-effort'' traffic requiring no guarantees. QoS guarantees can be provided in conventional packet networks by the use of proper packet scheduling algorithms. The function of a scheduling algorithm is to select the packet to be transmitted in the next cycle from the available arrived packets.
Network traffic can be categorized into two types: real-time traffic, such as video and audio and non-realtime traffic such as http data. Recently, there has been a significant increase in the amount of multimedia services transmitted over networks. These multimedia applications, due to the stringent delay constraints, have to meet certain QoS guarantees. Since scheduling has a direct impact on the system capacity and delay as well as throughput, it is therefore necessary to investigate the suitable scheduling algorithms for multimedia traffic.
The distinguishing characteristic of real-time traffic is that it requires bounded delay while it can tolerates some packet losses. The delay can be bounded by associating a deadline for each packet. Once a packet misses its deadline, it will be dropped as it is no longer useful. Therefore the main goal for any scheduling scheme for real-time traffic is to deliver packets in a timely manner.
As a computer revolution, many scheduling algorithms have been proposed to meet this goal. The First-Come-First-Serve (FCFS) scheduling algorithm, which is mostly used in conventional networks, is widely adopted for best-effort traffic. On the other hand, many scheduling algorithms have been proposed to provide different schemes of QoS guarantees, with Earliest Deadline First (EDF) as the most popular one.
Real-time systems: A real-time system has two notions of correctness: logical and temporal [1] . In particular, in addition to producing correct outputs (logical correctness), such a system needs to ensure that these outputs are produced at the correct time (temporal correctness). However, selecting appropriate methods for scheduling activities is one of the important considerations in the design of a real-time system [2] ; such methods are essential to ensure that all activities are able to meet their timing constraints. These timing constraints are usually specified using a deadline, which corresponds to the time by which a specific operation must complete.
Real-time systems can be broadly classified as hard or soft depending on the criticality of deadlines [3] . In hard real-time systems, all deadlines must be met; equivalently, a deadline miss results in an incorrect system. On the other hand, in a soft real-time system, timing constraints are less stringent; occasional deadline misses do not affect the correctness of the system.
A real-time system is typically composed of several or sequential tasks with timing constraints. In most real time systems, tasks are invocated repeatedly: each invocation of a task is referred as a job; and the corresponding time of invocation is referred as the job's release time or job's deadline [1] . Thus, the relative deadline parameter is used to specify the timing constraints of the jobs.
Related work: Many real-time systems rely on the earliest deadline first (EDF) scheduling algorithm. This algorithm has been shown to be optimal under many different conditions. For example, for independent, preemptable tasks, on uni-processor EDF is optimal in the sense that if any algorithm can find a schedule where all tasks meet their deadline then EDF can meet the deadline [4] . Also, Jackson's rule [5] says that ordering a set of tasks by deadline will minimize the maximum lateness. Further, it also has been shown that EDF is optimal under certain stochastic conditions [6] .
In spite of these advantageous properties, EDF has one major negative aspect. That is, when using EDF in a dynamic system, if overload occurs, tasks may miss deadlines in an unpredictable manner and in the worst case, the performance of the system can approach zero effective throughput. This is due to the fact that EDF gives highest priority to those processes that are close to missing their deadlines. In such situations, EDF does not provide any type of guarantee on which tasks will meet their timing constrains. This is a very undesirable behavior in practical systems, since in real-world applications intermittent overloads may occur due to exceptional situations, such as modifications in the environment, arrival of a burst of tasks, or cascades of system failures. In that case, matters may be improved by introducing some congestion control mechanism.
A robust earliest deadline scheduling algorithm for dealing with sporadic tasks under overloads in hard real-time environment was proposed by [7] . The algorithm synergistically combines many features including a very minimum level of guarantee, dynamic guarantees, graceful degradation in overloads, deadline tolerance and resource reclaiming. Also, in 1995 [8] presented a comparative study among scheduling algorithms, which use different priority, assignments and different guarantee mechanisms to improve the performance of a real-time system during overload conditions. Their results showed that EDF scheduling performs best if admission control is used along with a reclaiming mechanism that's takes advantage of early completions. In 1997 [9] introduced algorithms for flow admission control at an EDF link scheduler. Their results showed that these algorithms have very low computational complexity and are easily applicable in practice.
While real-time system designers try to design the system with sufficient resources, because of cost and highly unpredictable environments, it is sometimes impossible to guarantee that the system resources are sufficient; in this case EDF's performance degrades rapidly in overload situations. However, it is worthy to say that in the year of 1998, EDF was a major paradigm for real-time scheduling [10] .
EDF is a widely used algorithm for online deadline scheduling. It has been known for long that EDF is optimal for scheduling an underloaded, single processor system; recent results on the extra-resource analysis of EDF further revealed that EDF when using moderately faster processors can achieve optimal performance in the under loaded, multi-processor setting [11] , initiated the extra resource analysis of EDF for overloaded systems, showing that EDF supplemented with simple form of admission control can provide a similar performance guarantee in both single and multiprocessor settings.
Also, EDF is widely used in scheduling real-time database transactions [12] . By using EDF, database transactions are classified into two categories, those that have missed their deadlines and those that have not. The latter category can be scheduled using the EDF algorithm, while the former can be kept in background and executed whenever there are no transactions that have not missed their deadlines awaiting services.
A major problem with EDF, when scheduling network traffic, is that all flows receive the same miss rate regardless of their traffic characteristics and deadlines [13] . This makes the standard EDF algorithm unsuitable for situations in which the different flows have different miss rate requirements since in order to meet all miss rate requirements it is necessary to limit admissions so as to satisfy the flow with the most stringent miss rate requirements.

MATERIALS AND METHODS
The research methodology is based on breaking up the simulation into three stages: Decomposition: Breaks up the real problem into a set of autonomous elements that interact between them and whose interactions reproduce the real problem.
Modeling: That models each element by defining its functional capabilities, its behaviors and its interaction modes with other elements. This is done through building different java classes for the different elements.
Description: Description of possible actions between the elements by defining the laws which control them.
The performance evaluation technique used for this research is the simulation technique. Simulation is one of the most widely used operation-research and management science techniques. It is defined as the imitation of the operation of a real-world process or system over time. Thus, simulation modelling can be used both as an analysis tool for predicting the effect of changes to existing systems and as a design tool to predict the performance of new systems under varying sets of circumstances.
The specific nature of the developed simulator is considered as a Dynamic Stochastic Discrete event simulation. A dynamic simulation model represent a system as it evolves over time, stochastic is defined as the simulation model contains some probabilistic such as random input components. Finally, discrete event system is one for which the state variables change instantaneously at separated points of time.
System structure of the hierarchical Diff-EDF: The goal of the Hierarchical Diff-EDF scheduling algorithm is to guarantee that a flow's deadline miss rates meet its pre-specified QoS requirements and achieve the high utilization. In EDF scheduler, low priority flows, such as Non-Real-Time traffic, can starve as it is characterized with long lead-times. Despite EDF provides stable QoS guarantees to high priority flows, such as Real-Time traffic, the deadline miss rates of the low priority flows can be unacceptably high. Figure 1 models the EDF scheduler.   By analyzing the previous figure, three main drawbacks were discovered in using the EDF to schedule real-time packet network traffic: * All flows receive the same miss rate regardless of their traffic characteristics and deadlines. This makes the standard EDF algorithm unsuitable for situations in which the different flows have different miss rate requirements since in order to meet all miss rate requirements it is necessary to limit admissions so as to satisfy the flow with the most stringent miss rate requirements. * Packet Starving for the Non-Real-Time traffic.
Since Real-Time Traffic is characterized with short lead-times (time until their deadline expires), then it receives high priority comparing to the Non-Real-Time Traffic, which leads to packet starving. * A random Assignment of Network traffic (Real-Time and Non-Real-Time). As mentioned before, the FCFS scheduling algorithm is widely adopted for best-effort traffic. Having only one service discipline forces all traffic, regardless of their characteristics, to follow the same scheduling algorithm, in our case the EDF.
To overcome the first drawback of the EDF, a new Diff-EDF priority assignment algorithm is proposed [13] . The Diff-EDF scheduling algorithm considers each flow as having stochastic traffic characteristic, a stochastic deadline and a maximum allowable miss rate. Figure 2 shows a representative model for the Diff-EDF scheduler. Again by analyzing the Fig. 2, it is obvious that the last two drawbacks are still discovered when Diff-EDF is used to schedule non-real-time network traffic. As a result, it would be desirable to have a scheme which allows the individual deadline miss rates of different flows to be distinct and controllable. Our proposed Hierarchical Diff-EDF scheme satisfies this objective. It can meet the real-time needs of such applications, by using the Diff-EDF scheduler, while continuing to provide best effort service to non-real time traffic through depending on the strength of the FCFS scheduler. The Hierarchical Diff-EDF features a feedback control mechanism that detects overload conditions and modifies packet priority assignments accordingly. Figure 3 shows a representative model for the Hierarchical Diff-EDF scheduler.
The Hierarchical Diff-EDF scheduler uses a tuning method, or marker, that adjusts the deadlines of the incoming packets by adding a constant to the relative deadlines before the packets are placed into different queues based on the traffic type. Different constants are added to different flows and the modified deadlines are known as "Effective Deadlines".
Where θ is the probability that the Text queue has reached the threshold k. This probability is for the text queue size equals or exceeds k, and where β is the probability that priority condition was satisfied by a member of the 2 n queue (Audio). Accordingly, we will show our attempt to solve the equation (1) as an analytical solution for our mathematical model.

Attempting Analytical Solution:
Let , The Probability Density Function (PDF) of Y can be found using the distribution function technique in [14] as follows: The sample space here is a strip in the Cartesian plane where IAT extends horizontally from 0 to ∞ and Therefore, the PDF of MY is given by Hence, the PDF of MZ is given by The probability we need now is ( ) The analytical evaluation of this probability requires the joint PDF of MY and MZ then the integration of some complicated functions over some restricted regions. Now, for solving equation (1)some manipulations with the transformation techniques of random variables is used. This could result in the following boundary conditions:   The evaluation of performance measures for the queuing system under consideration depends on the solution to the above system of difference equations (4, 5, 6, and 7). The above system of equations is apparently very complicated. What makes things worse is the interdependence between the different queues as the service for one of them begins after certain conditions concerning the other queues are satisfied. This interdependence presents great difficulties in obtaining a closed form analytical solution. In fact, even for two-queue systems with such interdependence the analytical solution is not available [15,16] . The use of simulation techniques seems inevitable. Where t a is the packet's arrival time and insert the packet into the Diff-EDF queue in the order of increasing absolute deadline (smallest absolute deadline is at queue head thus served first).

Analysis of the Hierarchical Diff-EDF
Deadline miss rate prediction: Prediction of miss rate, per each flow j, is based on the Real-Time Queuing Theory (RTQT) analysis of the EDF algorithm. The basic methodology can be found in [17], [18], [19], or [20] . It had been found that when all flows have the same deadline miss rate, then it can be computed by: Determination of B j 's: As we mentioned before, one of the Hierarchical Diff-EDF system components is the Marker. A Marker adjusts the deadlines of incoming packets by adding a constant Bj , different constants are added to different flows, to the relative deadlines before the packets are placed into the queue. After tuning the Diff-EDF system to achieve the best QoS flow's requirements, it had been found that the constant values of B j could be computed by: Where 1/ θ is the mean of the exponential stationary distribution of the workload process, j φ is the deadline miss rate of the flow j, 1 φ is the smallest deadline miss rate among the flows and k is the number of the flows to be serviced. If we assume 1 B is the constant to be added for the deadlines in the video flow and that the video flow has the smallest deadline miss rate, then by applying the above equation: 1 B 1/ log1 0 = θ = . Hence, once the j B for the high priority flow is determined, the Diff-EDF system will select a much larger values of j B 's for the flows to be run at low priority.

Generating arrival packets:
In order to generate the arrival packets, a number of arguments must be determined as the following: * Number of sources in the system as s . Now, after determine the arguments we start generating the packets. Two Steps were carried out: 1. Using the Exponential Distribution, with a mean of j 1/ λ , to generate the inter-arrival time of the different packets. 2. Using the Uniform Distribution, with a mean of max min (QoS , Qos ) , to generate the relative deadlines for the different packets. An important issue that been taken into consideration when generating the arrival packets was to ensure that the Traffic Generator always obtain an initial seeds for the different streams. This mechanism will ensure that each flow is following a specified seed, when its packets are generated, to reflect the real-world traffic and leads for high accuracy. To do that, a Seed Initializer method is used to initialize seeds for the variety streams based on the defined mathematical techniques in [21] . Determination of effective deadlines range: As we mentioned earlier, the Uniform Distribution with a mean of max min (QoS , Qos ) is used to generate the relative deadlines for the different packets. max QoS and min QoS are the Effective Deadlines range for each flow j. Calyam and Lee in [22] had built a voice and video traffic measurement testbed to determine their effective deadline ranges. The Good range corresponds to delay values of (0-150) ms, the Acceptable range corresponds to delay values of (150-300) ms, while the Poor range corresponds to delay values > 300ms. Now, by observing Fig. 4 and 5, we can conclude: * The Real Good Range for the video traffic between (40, 150). * The Real Good Range for the audio traffic between (60, 160). * The Acceptable Range for both video and audio traffic between (150, 300). * The poor Range for both video and audio traffic is greater than 300. Based on the above real results, collected in largescale Internet, we choose our effective deadline, to achieve the highest system throughput, in the following manner: * Effective Video Deadline in the Good range (40, 150). * Effective Audio Deadline in the Acceptable range (250, 160). * Effective Text Deadline in the Poor range (assume 400, 300).

System queues implementation:
In Hierarchical Diff-EDF system, two different queues were implemented as the following: 1. Diff-EDF queue: This queue is implemented using Sorted Linked List, where the sorting is based on the min value of at (D i ) ′ + . The reason to choose this type of Linked List is to reduce scheduler complexity, so that rather than the scheduler will spend the time in picking up the shortest lead time packet to get serve, the queue is ready to be served starting from the queue head. This type of queue will serve all real-time flows (video and audio). 2. FCFS Queue: This queue is implemented using Linked List. The events are queued based on their Inter-arrival time at (i ) , with smallest at i at the head of the queue. This type of queue will serve the nonreal-time traffic (http data).

Feedback control mechanism:
The Hierarchical Diff-EDF scheduling algorithm features a feedback control mechanism that detects overload conditions and modifies packet priority assignment accordingly. To do that, the algorithm is implemented with a feedback control mechanism (Threshold limitation). In other words, the server always serves the packets in the Diff-EDF queue (high priority) and serves the FCFS queue (low priority) if either the Diff-EDF queue is empty or the FCFS queue reaches its threshold value. Now, after tuning the system to achieve the highest performance, through meeting all the flows deadline miss rates j φ , it has been found that the threshold value is when . On the other hand, the stopping case was found when the value approaches to T 0.7 / k λ .
System parameters: For this system a number of parameters were set as the following: * Packet Size: the packet size was chosen to be of 1500 Byte. The reason to choose this value is that almost more than 50% of the traffic being propagated has a packet size of 1500 Byte (Fig. 6). Here, four graphs were plotted to evaluate the efficiency of the Hierarchical Diff-EDF against both EDF and Diff-EDF with respect to the average delay. Figure 7 shows the packet average delay of the video flow. The results show that the average delay of the Hierarchical Diff-EDF is of linear shape with difference of 1.6 ms before it reaches the steady state when the system is extremely overloaded with difference of < 1ms. It is obvious that the peak improvement of the Hierarchical Diff-EDF over the EDF is achieved when the system is overloaded with 45000 packets; at this point the average delay difference reaches its maximum value with 31.6ms. When compared with Diff-EDF, the peak improvement is achieved when the system reaches its equilibrium point; at this point the average delay difference reaches its maximum value with 29.7 ms.
In Figure 8, we compare the average delay of the audio flow for the three schedulers. Again, the results show that the Hierarchical Diff-EDF average delay is still of linear shape at a smaller difference of 2.2ms before reaching system stability when it is extremely overloaded. It is noticeable here that the Hierarchical Diff-EDF achieves a remarkable performance over both EDF and Diff-EDF with a peak improvement of 124 ms and 101 ms respectively detected when the system is overloaded.
For measuring the average delay of the text flow, figure 9 was plotted. In this figure, we can observe that the Hierarchical Diff-EDF achieves a much lower average delay compared to both EDF and Diff-EDF. The Hierarchical Diff-EDF still keeps its linearity with 3.8 ms. The peak improvement is achieved at the equilibrium point of a moderate load with 40000 packets. This superior improvement is attributed for deploying a feedback control mechanism which enforces the desired service guarantees and prevent text flow packet starving.
Finally, to compare the total average delay for both schedulers, we plotted figure 10. The results show that Hierarchical Diff-EDF achieves the minimum delay, with 2.5 ms linear difference, compared to the EDF with 12 ms average difference and Diff-EDF with 11 ms. The peak improvement for the Hierarchical Diff-EDF over both EDF and Diff-EDF was 93 ms and 94 ms delay respectively. Hence, we can conclude that the Hierarchical Diff-EDF shows a remarkable scheduling performance over heterogonous network traffic by achieving the minimum total average delay.

CONCLUSION
For the past decade, a significant amount of research in data networks and telecommunications has been devoted to providing different levels of service guarantees. In this study, we have presented the new priority assignment scheduling algorithm Hierarchical Diff-EDF (Differentiate Earliest Deadline First), which can meet the real-time needs while continuing to provide best effort service to the non-real time traffic, over heterogeneous real-time network traffic. This Hierarchical Diff-EDF features a feedback control mechanism that detects overload conditions and modifies packet priority assignments accordingly. Also, our scheduler considers each flow as having stochastic traffic characteristic, a stochastic deadline and a maximum allowable miss rate. The Hierarchical Diff-EDF service meets the flow miss rate requirements through the combination of the hierarchal scheduling for the different network traffic classes (real-time and non real-time) and the admission control mechanism that detects the overload conditions to modify packet's priorities.
For examining the proposed scheduler model, we presented our attempt for providing an exact analytical solution. However, due to the high interdependency between the different queues' service, the solution was very complicated. Consequently, the use of simulation techniques seems inevitable. The simulation results show that the Hierarchical Diff-EDF scheduler produces a better performance of packet serving over heterogeneous network traffic through achieving the minimum miss ratio. This improvement is attributed to the use of the QoS priority based packet assignment. interface in a way that allows a user to specify more system parameters with different input data ranges such as bandwidth, packet size, arrival rate ( ), service rate (µ), number of sources, threshold value, type of traffic and size of multimedia stream. * To test the simulation with other different probability distribution functions rather than using the Poisson distribution and compare the obtained graphs with the collected one. * To carry out thorough performance evaluation studies between the Hierarchical Diff-EFD and GPS scheduling algorithms in situations where the GPS is preferable than EDF.