Table of Contents Author Guidelines Submit a Manuscript
Mathematical Problems in Engineering
Volume 2017, Article ID 1237438, 7 pages
https://doi.org/10.1155/2017/1237438
Research Article

Best Speed Fit EDF Scheduling for Performance Asymmetric Multiprocessors

1Department of Electronics and Computer Engineering, Hanyang University, Seoul, Republic of Korea
2Department of Computer Science and Engineering, Hanyang University, Seoul, Republic of Korea

Correspondence should be addressed to Minsoo Ryu; rk.ca.gnaynah@uyrsm

Received 10 October 2016; Revised 19 January 2017; Accepted 1 February 2017; Published 20 February 2017

Academic Editor: Alessandro Gasparetto

Copyright © 2017 Peng Wu and Minsoo Ryu. 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 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 asymmetric multiprocessors 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.

1. 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 Note5 and S6 Edge.

For embedded real-time systems, in addition to resource and power optimization, guaranteeing the deadlines of a real-time 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 [48]. 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 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.

2. 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, . We also assume that the speeds of processors are specified in nondecreasing order: 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 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 and the largest task utilization 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 of a task set is defined as follows: The concepts of processor demand bound function and processor load are used in the analysis of multiprocessor scheduling and are well-studied in detail in [9]. 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].

3. 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 no processor is idle while there is an active task, a scheduled task always executes on the best speed fit processor, if there exists such a processor, and 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 which has two processors and a task set . Initially, has the highest priority, and is the appropriate idle processor, so we allocate it to . The second priority job is allocated to processor . Job finishes at time ; therefore, time is a schedule event time. All tasks should be rescheduled. still has the highest priority; we allocate it to , and we allocate second priority job to . finishes its execution at time , so a schedule event appears. Now has the highest priority, so we allocate it to , and we allocate job to . 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, are schedule event points.

Figure 1: Task schedule under BSF-EDF.

4. 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 deadline miss of occurs at time-instant (and this is the earliest deadline miss).

Figure 2: A job of task arrives at and misses its deadline at time-instant .

For a given task set , 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 .

We derive a necessary condition for a task to miss its deadline, by following three steps: deriving a lower bound on the total amount of processor time demand during the time interval in Section 4.1, deriving an upper bound on the total amount of processor time demand during the time interval in Section 4.2, and combining the lower bound and upper bound into a necessary condition for task missing its deadline. Note that is a special time point that will be explained in the coming section.

4.1. Lower Bound

In this section, we obtain a lower bound of .

Consider job arriving at time misses its deadline at time-instant . Let be the total duration over for which exactly processors are busy in this BFS-EDF schedule, . Note that is necessarily zero, since does not finish before its deadline. Figure 3 manifests an example to understand this definition. denotes the cumulative speed of the currently running processors. We can then writeSince and , we can writeAs we mentioned in Section 2, means the cumulative speed of the first 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 thatLet . It immediately follows thatCombining (9) and (10), we haveDue 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 , which is the worst case processor time when is running on the slowest processor . The processor time that receives must not exceed , since job misses its deadline. Thus, we haveBy applying this to (11), we have Since , we can writeLet Then we haveBased on this, we now obtain a lower bound of , where is the earliest time point such that and . Note that we can always find such a time instant since at least satisfied and . Let ; then we finally have Note that the job cannot be completed before time , so the total amount of work processed can never exceed the amount of processor time demand. Thus, we haveIt immediately follows that As a result, is a lower bound of the total amount of processor time demand during the time interval .

Figure 3: An example: there are three processors, and the total length of blue color units is . The total length of orange color units is . The total length of purple color units is .
4.2. Upper Bound

We now obtain an upper bound of 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 and the jobs that arrive before but have not completed execution in the BSF-EDF schedule by the time-instant . We will refer to jobs arriving prior to that need execution over 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 determining an upper bound on the remaining processor time demand for each carry-in job, determining a maximum value of the number of carry-in jobs, and 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 remaining execution requirement at time-instant .

Proof. Let us consider a carry-in job of a task that arrives at time-instant and has not completed its execution by time (see Figure 2). Let . Let be the processing time that receives during time interval . By using the same approach as in Section 4.1, let be the total duration over for which exactly processors are busy in this BSF-EDF schedule. denotes the cumulative speed of the currently running processors over . Thus, the total amount of work processed in can be calculated by . Since , it immediately follows that Since we can also express the total amount of work done during the time interval by , we can writeBy applying (20) to (21), we have By the definition of (see (17)), it must satisfyNote that is the earliest time point such that and ), and we can also getIt immediately follows that By combining it to (22), we haveSince we can writeEquation (26) then becomes Observe that the amount of execution that carry-in job receives over is no less than since must be executing on one of the processors during any instant, when any processor is idle. Thus, we haveIt immediately follows that By (29) and (31), we can writeUsing (defined in Section 4.1) in (32), it follows that resulting in Note that and that the remaining processing time demand of the carry-in job of task is . Thus, we haveThe absolute deadline of carry-in job is no later than time ; that is, . Also, ; therefore

As a result, an upper bound of the remaining processor time demand for each carry-in job can be expressed as .

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

Proof. Let be an arbitrarily small positive number. From the definition of , it follows that Therefore, the work processed during is less than since . Based on the definition of , it follows that the work processed during is less than . Therefore some processor is idle during . This implies that all carry-in jobs 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 and let be an upper bound of . Thus, we have

Therefore the upper bound of is .

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 , whereAs a result, an upper bound of the total amount of processor time demand can be expressed as

4.3. BSF-EDF Schedulability Test

We now describe a sufficient schedulability test for the BSF-EDF scheduling algorithm.

Theorem 4. A task set is schedulable by BSF-EDF on an m-core performance asymmetric multiprocessor platform , with processing speeds , and for , if it satisfies the following condition: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.
From the foregoing discussion, we already got the upper bound and lower bound of the total amount of processor time demand during the time interval . As a result, we obtain the following bound on :Based on (43), we can get the necessary condition for a task to miss its deadline:Equivalently, the negation of this condition is sufficient to ensure BSF-EDF schedulability: which is as claimed in Theorem 4.

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

Competing Interests

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

Acknowledgments

This work was supported partly by the ICT R&D Program of MSIP/IITP [R01141600460001002, Software Black Box for Highly Dependable Computing] and partly by the National Research Foundation of Korea (NRF) Grant funded by the Korean Government (MSIP) (NRF-2015R1A5A7037751).

References

  1. T. Y. Morad, U. C. Weiser, A. Kolodny, M. Valero, and E. Ayguadé, “Performance, power efficiency and scalability of asymmetric cluster chip multiprocessors,” IEEE Computer Architecture Letters, vol. 5, no. 1, pp. 14–17, 2006. View at Publisher · View at Google Scholar · View at Scopus
  2. C. L. Liu and J. W. Layland, “Scheduling algorithms for multiprogramming in a hard-real-time environment,” Journal of the Association for Computing Machinery, vol. 20, pp. 46–61, 1973. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at MathSciNet · View at Scopus
  3. T. P. Baker, “Multiprocessor EDF and deadline monotonic schedulability analysis,” in Proceedings of the 24th IEEE International Real-Time Systems Symposium (RTSS '03), pp. 120–129, Washington, DC, USA, December 2003. View at Scopus
  4. J. Lee and I. Shin, “EDZL schedulability analysis in real-time multicore scheduling,” IEEE Transactions on Software Engineering, vol. 39, no. 7, pp. 910–916, 2013. View at Publisher · View at Google Scholar · View at Scopus
  5. M. Cirinei and T. P. Baker, “EDZL scheduling analysis,” in Proceedings of the 19th Euromicro Conference on Real-Time Systems (ECRTS '07), pp. 9–18, Pisa, Italy, July 2007. View at Publisher · View at Google Scholar · View at Scopus
  6. H. W. Wei, Y. H. Chao, S. S. Lin, K. J. Lin, and W. K. Shih, “Current results on EDZL scheduling for multiprocessor real-time systems,” in Proceedings of the 13th IEEE International Conference on Embedded and Real-Time Computing Systems and Applications (RTCSA '07), pp. 120–130, 2007.
  7. Y.-H. Chao, S.-S. Lin, and K.-J. Lin, “Schedulability issues for EDZL scheduling on real-time multiprocessor systems,” Information Processing Letters, vol. 107, no. 5, pp. 158–164, 2008. View at Publisher · View at Google Scholar · View at Zentralblatt MATH · View at Scopus
  8. P. Wu and M. Ryu, “EDZL scheduling and schedulability analysis for performance asymmetric multiprocessors,” International Journal of Foundations of Computer Science, vol. 27, no. 1, pp. 1–14, 2016. View at Publisher · View at Google Scholar · View at MathSciNet · View at Scopus
  9. S. K. Baruah, A. K. Mok, and L. E. Rosier, “Preemptively scheduling hard-real-time sporadic tasks on one processor,” in Proceedings of the 11th Real-Time Systems Symposium (RTSS '90), pp. 182–190, IEEE, Lake Buena Vista, Fla, USA, December 1990. View at Publisher · View at Google Scholar · View at Scopus
  10. T. P. Baker, N. Fisher, and S. Baruah, “Algorithms for determining the load of a sporadic task system,” Tech. Rep. TR-051201, 2005. View at Google Scholar