Best Speed Fit EDF Scheduling for Performance Asymmetric Multiprocessors

In order to improve the performance of a real-time system, asymmetric multiprocessors have been proposed. The benefits of improved system performance and reduced power consumption from such architectures cannot be fully exploited unless suitable task scheduling and task allocation approaches are implemented at the operating system level. Unfortunately, most of the previous research on scheduling algorithms for performance asymmetricmultiprocessors is focused on task priority assignment.They simply assign the highest priority task to the fastest processor. In this paper, we propose BSF-EDF (best speed fit for earliest deadline first) for performance asymmetric multiprocessor scheduling. This approach chooses a suitable processor rather than the fastest one, when allocating tasks. With this proposed BSF-EDF scheduling, we also derive an effective schedulability test.


Introduction
Modern semiconductor technology adopts the use of multiple processors in their motherboard design because of the growing demand of performance and saving energy which cannot be handled by single processor systems.In this regard, performance asymmetric multiprocessors, where individual cores possess different performance, are believed to provide improved performance and low power consumption when compared to performance symmetric multiprocessors, where the cores are identical [1].This is because such heterogeneous architecture allows the allocation of computing resources according to the needs of an application and better handling of dynamic workload requirements by exploiting speed of the fast cores and power efficiency of the slow cores available.One example of heterogeneous multiprocessor architectures is the ARM big.LITTLE architectures that combine slow and fast processing cores that possess identical instruction set but different execution speeds.The ARM big.LITTLE architectures are already used by Samsung in their Galaxy Note 5 and S6 Edge.
For embedded real-time systems, in addition to resource and power optimization, guaranteeing the deadlines of a realtime system is a critical requirement.Scheduling on such a performance asymmetric multicore platform is much more challenging than scheduling on identical multicore platform since the processing speed depends not only on the processor type, but also on the task executed.Thus, on heterogeneous multicore platforms, a decision that which type of processor will execute a given task over a period of time is also important.
Liu and Layland proposed earliest deadline first (EDF) scheduling algorithm on real-time single processor first in 1973 [2].It is proved to be an optimal algorithm on single processor.Baker demonstrated an efficiently computable schedulability test for EDF scheduling on an asymmetric multiprocessors platform [3].However, most of the previous research on EDF scheduling algorithm and relative scheduling algorithms for performance asymmetric multiprocessors is focused on the task priority approach [4][5][6][7][8].They simply assign the highest priority task to the fastest processor.Since processors have different processing speeds in performance asymmetric multiprocessors, we believe that task allocation to an appropriate processor is also an important issue to be considered.
In the current research we focus on providing an improved scheduling algorithm based on EDF for handling 2 Mathematical Problems in Engineering real-time tasks for performance asymmetric multiprocessor systems.More specifically, we propose a new EDF scheduling algorithm, best speed fit EDF (BSF-EDF).For BSF-EDF, the priorities of the tasks are chosen according to the original EDF scheduling algorithm, whereas it differs in terms of task allocation to processors, such that in the former approach the highest priority task is assigned to a faster processor and in the latter approach the highest priority task is allocated to the appropriate idle processor.We also obtain a new schedulability test for the BSF-EDF on performance asymmetric multiprocessors.
The rest of the paper is organized as follows.In Section 2, we describe system model and background.Section 3 presents the BSF-EDF scheduling with an example.In Section 4, we describe the proposed schedulability test for the BSF-EDF scheduling algorithm.

System Model and Background
We consider an -core performance asymmetric multiprocessor system and we use  to denote the set of  performance asymmetric processors.We use   to represent the processing speed of any processor   .For convenience we use 1 to represent the speed of the slowest processor, such that the speed of faster processors can be represented by a multiple of 1; for example,   = 3.We also assume that the speeds of processors are specified in nondecreasing order:   ≤  +1 for all .Let   be the cumulative sum of processor speeds of the first  processors in a performance asymmetric multiprocessors platform : Immediately,   denotes the cumulative sum of .
In this paper, we consider a sporadic task model.Let D = { 1 ,  2 ,  3 , . . .,   } be a set of  sporadic tasks.A sporadic task   is defined by a 3-tuple (  ,   ,   ), where   is the worst case execution time when it is executed in the lowest speed processor,   is the relative constrained deadline such that   ≤   ≤   , and   is the minimum interarrival time, which is also referred as period of the task.The minimum interarrival time   means that any two consecutive requests of   are separated by at least   .We use  , to represent the jth job of task   and  , to denote the arrival time of  , .Note that a task can have different execution time based on different speeds of processors.Therefore, a job executing on the jth processor for a duration of  time can receive  ×   units of execution.
Now we introduce several further notions that we will use for schedulability analysis.Since processors have varying speeds, we use the slowest processor to measure the worst case execution time   of a task   .The utilization   of a task   is the ratio of the worst case execution time to its period, that is,   /  .The total utilization  sum (Γ) and the largest task utilization  max (Γ) of a task set are defined as follows: The density   of a task   is defined to be the ratio of   /  , that is, ratio of the worst case execution time to the relative deadline.The maximum density  max (Γ) of a task set Γ is defined as follows: The concepts of processor demand bound function DBF (  , Δ) and processor load are used in the analysis of multiprocessor scheduling and are well-studied in detail in [9].DBF (  , Δ) is used to represent an upper bound on the maximum cumulative processing time demand by jobs of   that arrive in and also have deadline within any interval of length Δ.It has been shown that The processor load parameter is based on the DBF function which is the maximum value of the ratio of processor demand bound and length of the time interval Δ [10].

BSF-EDF Scheduling Algorithm for Performance Asymmetric Multiprocessor Platform
Our scheduling algorithm proposed in this paper is a priority driven scheduling algorithm, which means that the highest priority task always runs first.Moreover, we choose global multiprocessor scheduling policy.Global scheduling maintains a single system-wide queue of ready tasks, from which tasks are extracted at run-time, to be scheduled on the available computing resources.Global scheduling is more appropriate for open systems, as there is no need to run load balancing algorithms when the set of tasks changes.We also allow preemption of tasks in our proposed BSF-EDF scheduling algorithm and migration of tasks between different speed processors is also permitted.Now there are two crucial issues to be addressed, task priority assignment and task allocation to processors.For BSF-EDF scheduling we assign the priorities to tasks according to their absolute deadline, such that the task with earlier deadline has higher priority.In previous research work, individuals simply assign the highest priority task to the fastest idle processor.Contrary to this, we assign the highest priority task to the appropriate idle processor rather than the fastest idle one.The appropriate processor is the slowest speed processor which ensures that a task can be executed without missing its deadline.In other words, we choose the slowest speed idle processor whose speed is no less than the utilization of the task.If there does not exist such appropriate processor, we allocate the task to the slowest idle processor.We should reschedule all the tasks whenever a schedule event  occurs.Schedule events include two cases, when (a) a running job is finished and (b) a new job has arrived.Specifically, we say that (1) no processor is idle while there is an active task, (2) a scheduled task always executes on the best speed fit processor, if there exists such a processor, and (3) higher priority task always runs first.
Example 1. Figure 1 manifests a simple BSF-EDF scheduling example on a performance asymmetric multiprocessor platform.Consider a performance asymmetric multiprocessor platform  = {1, 2} which has two processors and a task set D = { 1 (4, 4, 4),  2 (4, 4, 4),  3 (6, 6, 6)}.Initially,  1,1 has the highest priority, and  1 is the appropriate idle processor, so we allocate it to  1 .The second priority job  2,1 is allocated to processor  2 .Job  2,1 finishes at time  = 2; therefore, time  = 2 is a schedule event time.All tasks should be rescheduled. 1,1 still has the highest priority; we allocate it to  1 , and we allocate second priority job  3,1 to  2 . 1,1 finishes its execution at time  = 4, so a schedule event appears.Now  3,1 has the highest priority, so we allocate it to  1 , and we allocate job  1,2 to  2 .It is easy to see that all tasks will satisfy their deadline under BSF-EDF.The processors are used to their 100% utilization.As shown in the figure,  = {2, 4, 6, 8, 10, 12} are schedule event points.

BSF-EDF Schedulability Analysis for Performance Asymmetric Multiprocessor Platform
With respect to a given platform, a given sporadic task set is said to be BSF-EDF schedulable if the schedule is able to meet all deadlines for every collection of jobs that may be generated by the task set.In this section, we derive a schedulability test for the BSF-EDF scheduling on performance asymmetric multiprocessors.
We first obtain a necessary condition when a task misses its deadline for the BSF-EDF scheduling.By taking the contrapositive of the condition, we obtain a sufficient schedulability condition.
Suppose that a job  , of task   is the one to first miss its deadline at time-instant  , +   (see Figure 2). , denotes the arrival time of job  , .Due to the properties of BSF-EDF scheduling, we discard the legal sequence of jobs with deadlines later than  , +   .We only consider the BSF-EDF schedule of the remaining legal sequence of job requests, since the later deadline jobs have no effect on the scheduling of earlier deadline ones under BSF-EDF.It follows that a We derive a necessary condition for a task   to miss its deadline, by following three steps: (1) deriving a lower bound on the total amount of processor time demand during the time interval [ 0 ,  , +   ) in Section 4.1, (2) deriving an upper bound on the total amount of processor time demand during the time interval [ 0 ,  , +   ) in Section 4.2, and (3) combining the lower bound and upper bound into a necessary condition for task   missing its deadline.Note that  0 is a special time point that will be explained in the coming section.

Lower Bound.
In this section, we obtain a lower bound of ( 0 ,  , +   ).
Consider job  , arriving at time  , misses its deadline at time-instant  , +   .Let  V be the total duration over [ , ,  , +   ) for which exactly V processors are busy in this BFS-EDF schedule, 0 ≤ V ≤ .Note that  0 is necessarily zero, since  , does not finish before its deadline.Figure 3 manifests an example to understand this definition.

𝑆 󸀠
V denotes the cumulative speed of the currently running V processors.We can then write Since As we mentioned in Section 2,  V means the cumulative speed of the first V lowest speed processors.The tasks may be allocated to the faster speed processors under BSF-EDF; therefore we can get From ( 7) and ( 8) above, we conclude that Let () = max 1≤≤ (∑  =+1   / 1 ).It immediately follows that Combining ( 9) and ( 10), we have Due to the work conserving property of BSF-EDF,  , must always be running in one of processors in time interval [ , ,  , +   ), except when all the processors are busy.The processor time that  , receives during [ , ,  , +   ) cannot be less than ∑ −1 V=1  1  V , which is the worst case processor time when  , is running on the slowest processor  1 .The processor time that  , receives must not exceed   , since job  , misses its deadline.Thus, we have By applying this to (11), we have

𝑊 (𝐴
It immediately follows that As a result, Δ is a lower bound of the total amount of processor time demand during the time interval [ 0 ,  , +  ).

Upper Bound.
We now obtain an upper bound of ( 0 ,  , +   ) of the total amount of processor time demand.
For this, we need to consider two types of jobs, regular jobs that arrived at or after  0 and the jobs that arrive before  0 but have not completed execution in the BSF-EDF schedule by the time-instant  0 .We will refer to jobs arriving prior to  0 that need execution over [ 0 ,  , +   ) as carry-in jobs.We use   to denote the total amount of processor time demand caused by carry-in jobs and use   to denote the total amount of processor time demand caused by the regular jobs.We first compute the upper bound of   by (1) determining an upper bound on the remaining processor time demand for each carry-in job, (2) determining a maximum value of the number of carry-in jobs, and (3) combining the per-job bounds to obtain an upper bound on the total remaining processor time demand of all carry-in jobs.
Lemma 2. Each carry-in job has less than  max (Γ)Δ remaining execution requirement at time-instant  0 .
Proof.Let us consider a carry-in job  , of a task   that arrives at time-instant  , <  0 and has not completed its execution by time  0 (see Figure 2).Let  , =  0 − , .Let   , be the processing time that  , receives during time interval [ , ,  0 ).By using the same approach as in Section 4.1, let  V be the total duration over [ , ,  0 ) for which exactly V processors are busy in this BSF-EDF schedule. V denotes the cumulative speed of the currently running V processors over [ , ,  0 ).Thus, the total amount of work processed in [ , ,  0 ) can be calculated by Since we can also express the total amount of work done during the time interval [ , ,  0 ) by ( , ,  , +   ) − ( 0 ,  , +   ), we can write By applying (20) to (21), we have By the definition of  0 (see ( 17)), it must satisfy Note that  0 is the earliest time point  such that  ≤  , and (,  , +   ) > ( , +   − ), and we can also get It immediately follows that By combining it to (22), we have Since we can write Equation ( 26) then becomes Observe that the amount of execution that carry-in job  , receives over [ , ,  0 ) is no less than ∑ −1 V=1  V  1 since  , must be executing on one of the processors during any instant, when any processor is idle.Thus, we have As a result, an upper bound of the remaining processor time demand for each carry-in job can be expressed as  max (Γ)Δ.
We obtained the upper bound on the remaining processor time demand for each carry-in job.We will now determine the maximum value of the number of carry-in jobs.

Lemma 3. The number of carry-in jobs is bounded by
where  and Ω are defined in ( 15) and (37), respectively.
Proof.We prove it through the principle of contradiction.We obtain necessary condition for the job  , missing its deadline.Negating this condition yields a sufficient condition for the BSF-EDF schedulability.
which is as claimed in Theorem 4.

Conclusions
In this paper, we presented a unique approach to task allocation in a performance asymmetric multiprocessor system based on EDF, called BSF-EDF.In BSF-EDF we chose the appropriate slowest speed processor to execute the highest priority task.To our knowledge, this is the first piece of work that considers the task allocation problem on performance asymmetric multiprocessors.We hold the view that choosing an appropriate processor instead of a fastest one gives opportunities of improved scheduling, by reserving fast processors for future tasks that will arrive later.We have also presented an effective schedulability test for performance asymmetric multiprocessors based on the properties of the proposed BSF-EDF.
negation of this condition is sufficient to ensure BSF-EDF schedulability: LOAD (D) ≤  − Ω max (Γ) , Figure2: A job  , of task   arrives at  , and misses its deadline at time-instant  , +   .Figure3: An example: there are three processors, and the total length of blue color units is  3 .The total length of orange color units is  2 .The total length of purple color units is  1 .deadlinemiss of   occurs at time-instant  , +   (and this is the earliest deadline miss).For a given task set D = { 1 ,  2 ,  3 , . . .,   }, let (  ,   ) be the total amount of work done during [  ,   ), and let (  ,   ) be the total amount of processor time demand in [  ,   ) required by all the jobs in this legal sequence of task set D.

)
[9,10]Let  be an arbitrarily small positive number.From the definition of  0 , it follows that ( 0 ,  , +   ) > Δ,  ( 0 − ,  , +   ) ≤  ( + Δ) .Mathematical Problems in Engineering are running in this interval and the number of carry-in jobs is the same as the number of busy processors.Let  be the number of busy processors over [ 0 − ,  0 ) and let Ω be an upper bound of .Thus, we haveΩ = max { :   < } .(39)Therefore the upper bound of   is ΩΔ max (Γ).Now let us consider the upper bound of the total amount of processor time demand caused by regular jobs.Fortunately, it is a well-studied subject, and algorithms are known for computing DBF and LOAD[9,10].Baruah et al.showed that the upper bound of   can be calculated by Δ × LOAD(Γ), where A task set D = { 1 ,  2 ,  3 , . . .,   } is schedulable by BSF-EDF on an m-core performance asymmetric multiprocessor platform  = { 1 ,  2 , . . .,   }, with processing speeds  1 =  2 = ⋅ ⋅ ⋅ =   = 1, and   > 1 for  <  ≤ , if it satisfies the following condition: Therefore, the work processed during [ 0 − ,  0 ) is less than  since ( 0 − ,  , +   ) − ( 0 ,  , +   ) < .Based on the definition of  ≤   , it follows that the work processed during [ 0 − ,  0 ) is less than   .Therefore some processor is idle during [ 0 − ,  0 ).This implies that all carry-in jobs ) if Δ ≥     if Δ <   .(40)As a result, an upper bound of the total amount of processor time demand can be expressed as  ( 0 ,  , +   ) ≤ LOAD (Γ) Δ + ΩΔ max (Γ) .