• 沒有找到結果。

Effective Fault-tolerant Scheduling Algorithms for Real-time Tasks on Heterogeneous Systems

N/A
N/A
Protected

Academic year: 2021

Share "Effective Fault-tolerant Scheduling Algorithms for Real-time Tasks on Heterogeneous Systems"

Copied!
8
0
0

加載中.... (立即查看全文)

全文

(1)Effective Fault-tolerant Scheduling Algorithms for Real-time Tasks on Heterogeneous Systems Yi-Hsuan Lee, Ming-Dien Chang, and Cheng Chen Department of Computer Science and Information Engineering National Chiao Tung University, Hsinchu, Taiwan, R.O.C. E-mail: {yslee, mdchang, cchen}@csie.nctu.edu.tw Abstract. classified into three categories [12]. Among. Real-time systems are being increasingly used in several applications which are time critical in nature. Tasks corresponding to these. them the hard real-time system is most strict, and in this paper we will focus on it. The. demand. for. complex. real-time. applications have deadlines to be met. Due to. applications, which require high computational. the catastrophic consequences of not tolerating. needs with timing constrains and fault-tolerant. faults, fault-tolerance is also an important. requirements, has led to the choice of multi-. requirement of such systems. In this paper, we. processor systems. Due to the critical nature of. use the common Primary/Backup (PB) scheme. tasks in a hard real-time system, every admitted. to propose three algorithms, which are used to. task must complete its execution even in the. schedule real-time tasks with fault-tolerant. presence of processor failures [3, 6]. In multi-. requirements on heterogeneous systems. Our. processor. algorithms are modified and extended from. provided by scheduling multiple versions of. existed algorithms, and aim at enhancing their. tasks on different processors [4, 8]. Four. performances. time. different schemes have evolved for fault-tolerant. complexity. Based on our simulation, all of them. scheduling of real-time tasks [3, 5, 7, 11].. can achieve expected results. Besides, one of. Among them we choose the Primary/Backup. them also can use lower scheduling cost to. (PB) scheme, which is the most popular one.. without. increasing. the. obtain reasonable performances, which make it become much effectively and efficiently. Keywords:. Real-time,. Fault-tolerant,. systems,. fault-tolerance. can. be. Some effective scheduling algorithms used for real-time multiprocessor system have been. Task. scheduling, Heterogeneous system. proposed, but most of them are designed for homogeneous system [1-3, 6, 13]. In this paper, we propose three fault-tolerant task scheduling. 1 Introduction. algorithms to schedule real-time tasks on. Real-time systems are defined as those. heterogeneous system. These algorithms are. systems in which the correctness of the system. modified and extended from existed algorithms. depends not only on the logical result of. [6, 14], and aim at enhancing their performances. computation, but also on the time at which the. without increasing the time complexity. Based. results are produced [3, 6, 9]. It can be broadly. on our simulation, all of them can achieve.

(2) expected results. Moreover, our third algorithm. all tasks are met. A partial schedule is one. can use lower scheduling cost to achieve. which does not contain all tasks.. reasonable performances, which make it become. Definition 2.2 For a task Ti, st(Pri) and ft(Pri). much effectively and efficiently.. are scheduled start time and scheduled finish. The remainder of this paper is organized. time of its primary copy Pri respectively.. as follows. Section 2 surveys the fundamental. Definition 2.3 For a task Ti, st(Bki) and ft(Bki). background. Design issues and principles of our. are scheduled start time and scheduled finish. algorithms are introduced in Section 3. In. time of its backup copy Bki respectively.. Section 4, some experimental results are given.. Definition 2.4 The primary and backup copies. Finally, we give some conclusions in Section 5.. of a task Ti are said to be mutually exclusive in time if st(Bki) ≥ ft(Pri).. 2 Fundamental Background. Definition 2.5 For a task Ti, proc(Pri) and. 2.1 System, Task, and Fault Models [3, 6, 14]. proc(Bki) are processors where its two copies Pri. The heterogeneous system consists of m. and Bki are scheduled.. heterogeneous processors, P1…Pm, connected by. Definition 2.6 The primary and backup copies. a network. Every processor may fail due to. of a task Ti are said to be mutually exclusive in. hardware fault which results in task’s failures.. space if proc(Pri) ≠ proc(Bki).. The faults can be transient or permanent and are. A task Ti is feasible in a fault-tolerant. independent. Each independent fault results in. schedule if it satisfies the following two. failing of only one processor. This assumption. conditions. The first one is ri ≤ st(Pri) < ft(Pri) ≤. can be relaxed by grouping processors [1, 6].. st(Bki) < ft(Bki) ≤ di, because both copies must. Many real-rime task scheduling algorithms. satisfy the timing constraints and time exclusion.. assume that tasks are independent, because [5]. The second one is Pri and Bki should mutually. have proven that precedence constraints can be. exclude in space, which is necessary to tolerate. actually removed. Thus, we simply assume tasks. permanent processor failures.. are aperiodic, independent, non-preemptive, and not parallelizable. Every task Ti has following. 2.3 Related Work. attributes: ready time (ri), computation time on. Because PB scheme schedules two copies. processor Pj (cij), and deadline (di). Each task Ti. of a task on different processors, the entire. has two versions, primary copy (Pri) and backup. schedulability is obviously decreased. Thus,. copy (Bki), which have identical attributes. Since. BB-overloading technique, proposed in [3],. we assume tasks are not parallelizable, di – ri. describes that Bki and Bkj scheduled on the same. should be long enough so that both copies of Ti. processor can overlap if proc(Pri) ≠ proc(Prj).. can be scheduled within this interval.. Notice that applying this technique must assume that only one processor may fail at a time. Under. 2.2 Basic Terminologies [3, 6, 14]. this assumption, the principle of BB-overloading. Definition 2.1 The feasible schedule S ensures. technique is quite trivial because proc(Pri) and. that the timing and fault-tolerant constraints of. proc(Prj) will not fail together..

(3) scheduling. Distance Myopic Algorithm (DMA) is. algorithms have been proposed to schedule. extended from MA to support fault-tolerance. It. real-time basks on multiprocessor system and. treats Pri and Bki of task Ti as separate tasks and. support fault-tolerance [1-3, 6, 13]. Nevertheless,. constructs a task queue according to deadlines. only a few of them focus on heterogeneous. and variable distance. Unlike eFRCD, Pri and. system. In the following we introduce efficient. Bki will be scheduled separately in DMA.. Fault-tolerant Reliability Cost Driven (eFRCD). Basically, DMA can yield higher schedulability.. [14], Myopic Algorithm [10], and Distance. But DMA is only designed for homogeneous. Myopic Algorithm (DMA) [6], which we choose. system, and one of its main drawbacks is the. to modify and design our methods.. difficulty to select variables K and distance.. Recently,. many. heuristic. eFRCD is a static algorithm to schedule real-time tasks on heterogeneous system. Unlike. 3 Proposed Effective Algorithms. most real-time task scheduling algorithms, it. In this section, we introduce our three. considers factors such as precedence constraints. algorithms. All of our algorithms are integrated. among tasks, fault-tolerance, and reliability cost. with BB-overloading technique.. simultaneously. In eFRCD, tasks are ordered in non-decreasing order of deadlines at first. Then,. 3.1 Modified eFRCD Algorithm. Pri and Bki are allocated to processors with. The first Modified eFRCD algorithm is. minimum reliability costs at the same time.. simplified from eFRCD to match our system and. Although eFRCD is entirely simple and efficient,. task models. Since we ignore precedence. it usually suffers from lower schedulability.. constraints and reliability cost, some variables. Myopic Algorithm (MA) is a heuristic. used in eFRCD are redefined. The pseudo code. search algorithm that schedules real-time tasks. of Modified eFRCD is shown in Figure 1.. on multiprocessor system. It still orders tasks in. Definition 3.1 For a task Ti, the Latest Finish. non-decreasing order of deadlines, and uses two. Time(LFT), which is the time that the task copy. features doing scheduling. The first one is using. must complete before, of its two copies are. a feasibility check window to contain the first K. defined as follows.. check window, the higher the scheduling cost.  LFT ( Pri ) = di − max cij j   LFT ( Bki ) = di. and the more the look-ahead nature. The second. Definition 3.2 For a task Ti, ESTj(Pri) is the. one is using an integrated heuristic function to. Earliest Start Time on processor Pj that can. select task. It will rearrange the sequence of. complete its primary copy before LFT(Pri).. tasks being scheduled, which can improve the. ESTj(Pri) should be within time interval [max(ri,. schedulability by selecting the most appropriate. avail(j)), LFT(Pri) – cij], where avail(j) is the. task. Moreover, MA has the capability of. time that Pj is available to execute Pri.. backtracking. If the current schedule cannot be. Definition 3.3 For a task Ti, ESTj(Bki) is the. extended any more, it will deallocate the last. Earliest Start Time on processor Pj that can. scheduled task and try to schedule another one.. complete its backup copy before LFT(Bk i).. tasks in the task queue. The larger the feasibility.

(4) 1. Order tasks in non-decreasing order of deadlines 2. for (the unscheduled task Ti with minimal deadline) (a) for (each processor Pj) Calculate ESTj(Pri) (b) if (there exists processors that can complete Pri in-time) Allocate Pri to processor Pk with minimal ESTk(Pri) (c) else Reject Ti and go to Step 3 (d) for (each processor Pj except proc(Pri)) Calculate ESTj(Bki) (e) if (there exists processors that can complete Bki in-time) Allocate Bki to processor Pk with minimal ESTk(Bki) (f) else Reject Ti and deallocate Pri from the schedule 3. Repeat Step 2 until all tasks are scheduled Figure 1. Modified eFRCD Algorithm. ESTj(Bki) should be within time interval [max (ft(Pri), avail(j)), LFT(Bki) – cij], where avail(j) is the time that Pj is available to execute Bki.. EFTj ( Pri ) = ESTj ( Pri ) + cij  EFTj ( Bki ) = ESTj ( Bki ) + cij. Definition 3.5 For a task Ti, the Earliest Finish Time (EFT) of its two copies are defined as. 3.2 Heterogeneous. Distance. Myopic. EFT(Bki) is set to infinite.. Algorithm Modified eFRCD is actually very efficient, but it lacks for look-ahead nature. Furthermore, Modified. eFRCD. follows. Notice that if Pri is not yet scheduled,. schedules. task.  EFT ( Pri ) = min EFTj ( Pri) + cij j   EFT ( Bk i ) = min EFTj ( Bki) + cij  j. copies. Definition 3.6 A partial schedule is strongly. according to their earliest start time, which is not. feasible if a feasible schedule can be generated. appropriate in heterogeneous system.. by extending the current partial schedule with. We have introduced that DMA uses the. each task of the feasibility check window.. feasibility check window and an integrated. We redefine the integrated heuristic func-. heuristic function doing scheduling. Using. tion H = LFT(Pri)/LFT(Bki) + W × EFT(Pri)/. feasibility check window can achieve the. EFT(Bki), where W is an input parameter.. look-ahead nature, so DMA won’t suffer from. Except the heuristic function, other scheduling. above drawback. Besides, authors of MA have. mechanisms of HDMA are retained from DMA.. proven that the integrated heuristic function. Figure 2 shows the pseudo code of our HDMA.. performs better than simple heuristic function. Although DMA is quite effective, however, it is. 3.3 Fault-Tolerant Myopic Algorithm. only designed for homogeneous system. Hence,. Since HDMA is directly extended from. our second Heterogeneous Distance Myopic. DMA, it retains two drawbacks. The first one is. Algorithm (HDMA) is extended from DMA to. the difficulty of selecting variables distance and. support the heterogeneous system.. K. Authors of DMA have pointed out that the. Definition 3.4 For a task Ti, EFTj(Pri) and. right combination offers the best scheduling. EFTj(Bki) indicate the Earliest Finish Time on. performance, but this combination will depend. processor Pj of its two copies respectively.. on characteristics of the input task set [6]..

(5) 1. Order tasks (primary copies) in non-decreasing order of deadlines and insert backup copies 2. for (all tasks in the feasibility check window) 3. Check for strong feasibility:. Calculate their EFT(Pri/Bki). 4. if (strongly feasible or no more backtracking is possible) (a) Calculate heuristic values for tasks in the feasibility check window (b) Choose the task Pri/Bki with the smallest heuristic value to extend the schedule (c) if (the chosen task Pri/Bki can meet its latest finish time) proc(Pri/Bki) = Pk, where Pk is the processor with EFTk(Pri/Bki) = EFT(Pri/Bki) (d) else Reject Pri/Bki (e) if (the rejected task is a primary copy) Delete its backup copy from the schedule (f) else Deallocate its primary copy from the schedule 5. else backtrack and try the task with the next smallest heuristic value. Goto Step 8 6. Move the feasibility check window by one task to the right 7. Repeat Steps 3 ~ 7 until all tasks in the task queue are considered Figure 2. Heterogeneous Distance Myopic Algorithm (HDMA). The second one is much implicit. In DMA, task. the feasibility check window. From Definition. copies are moved into the feasibility check. 3.5, only if a primary copy is scheduled, the. window based on the predefined sequence. But. heuristic value of its backup copy will not equal. actually, a backup copy becomes schedulable. to infinite. That is, only schedulable backup. only after its primary copy has been scheduled. copies will be moved into the feasibility check. yet. Therefore, the feasibility check window. window. From above two features, FTMA can. may contain unschedulable backup copies. In. obviously overcome both drawbacks of HDMA. this situation, the feasibility check window. without increasing the time complexity. Hence,. seems to be smaller than its actual size, which. we expect that FTMA could outperform HDMA.. may decrease the schedulability indirectly.. Figure 3 is the pseudo code of FTMA.. In order to overcome above drawbacks, we propose Fault-Tolerant Myopic Algorithm (FTMA). Like DMA, FTMA also follows. 4 Performance Studies 4.1 Simulation Environment. scheduling mechanisms from MA. Our design. In this section, we construct a simulation. features focus on task queue construction and. environment to evaluate above algorithms.. feasibility check window movement, which are. Instead of randomly generating task sets, we. described in detail below.. construct a task set generator, similar to the one. In FTMA, primary and backup copies are. provided in MA, to guarantee schedulable task. separately ordered in non-decreasing order of. sets. Also, the tasks are generated to guarantee. deadlines. This feature can avoid the difficulty. the (almost) total utilization of the processors.. of selecting distance. During each scheduling. Notices that the schedule generated by the. step, we calculate heuristic values of the first. generator is used only for the purpose of. primary and backup copies. The heuristic. generating a feasible task set of tasks which are. function is the same as DMA, and the task copy. then input to the scheduling algorithm, i.e., the. with smaller heuristic values will be moved into. scheduling algorithms have no knowledge of the.

(6) 1. Order tasks in non-decreasing order of deadlines to construct primary and backup task queues 2. Put the first K tasks of primary task queue into the feasibility check window 3. for (all tasks in the feasibility check window) Calculate their EFT(Pri/Bki) 4. Check for strong feasibility 5. if (strong feasible or no more backtracking is possible) (a) Calculate heuristic values for tasks in the feasibility check window (b) Choose the task Pri/Bki with the smallest heuristic value to extend the schedule (c) if (the chosen task can meet its latest finish time) proc(Pri/Bki) = Pk, where Pk is the processor with EFTk(Pri/Bki) = EFT(Pri/Bki) (d) else Reject Pri/Bki (e) if (the rejected task is a primary copy). Delete its backup copy from the task queue. (f) else Deallocate its primary copy from the schedule 6. else backtrack and try the task with the next smallest heuristic value. Goto Step 10 7. Calculate heuristic values for the first primary copy Pri and the first backup copy Bki 8. Move Pri or Bki with smaller heuristic value into the feasibility check window 9. Repeat Steps 4 ~ 9 until all tasks in both primary and backup task queues are considered Figure 3. Fault-Tolerant Myopic Algorithm (FTMA). schedule itself but are only given the tasks and. time interval between deadline and ready time of. their requirements.. a task is longer, every algorithm has much. About the evaluating metric, we use guarantee ratio (GR) as DMA [6]. It is defined. flexibility to be more effective. Among them, FTMA is obviously the most effective one.. by the percentage of tasks arrived in the system. Figure 5 shows the effect of varying the. whose deadlines are met. Hence, if the guarantee. size of feasibility check window for HDMA and. ratio is higher, the scheduling ability of that. FTMA. Authors of DMA recommend that if. algorithm is higher, since the input task set is. there are m processors, distance may be in the. guaranteed schedulable. In the following we. range [m/2, m] and K may be less than distance.. present three parts of simulation results, which. In HDMA we follow this suggestion, and in. highlight effects of parameters laxity, size of. FTMA K is unrestricted because it doesn’t use. feasibility check window (K), and distance (d).. distance. Similar as Figure 4, FTMA achieves much better results than that of HDMA.. 4.2 Experimental Results. Moreover, guarantee ratio influenced by K is not. At first, we discuss the effect of the weight. significant, which indicates smaller feasibility. value W in the integrated heuristic function.. check window also can obtain reasonable results,. From simulation results, effects of different W. especially in FTMA. Since smaller K means. values are little significance. Hence, we simply. lower scheduling cost, this feature can lead. set W = 1 in the following evaluations.. FTMA to a much efficient algorithm.. The effect of laxity is studied in Figure 4.. Finally, we study the effect of distance.. As the laxity increases, the guarantee ratio also. This time we let K = d, which achieves better. increases for all three algorithms. This result. results theoretically. In Figure 6, whether the. seems trivial. Because larger laxity indicates the. number of processor is, guarantee ratio increases.

(7) 1. 0.9. 0.9. 0.8. eFRCD HDMA (d=3) HDMA (d=5) FTMA. 0.7. Guarantee Ratio. Guarantee Ratio. 1. 0.8. eFRCD HDMA (d=4). 0.7. HDMA (d=8) FTMA. 0.6. 0.6 3. 4. laxity. 5. 3. 6. 4. laxity. 5. 6. (a) (b) Figure 4. Effect of task laxity. (a) 5 processors, (b) 8 processors. 1. Guarantee Ratio. Guarantee Ratio. 0.95 0.9 0.85 0.8 0.75 0.7 0.65. HDMA (d=3) FTMA. HDMA (d=5). 3. 8. 0.6 1. 2. 4. 5 6 7 window size. 1 0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.6 0.55. HDMA (d=4) FT MA 1. 9 10 11. 2. 3. HDMA (d=8). 4 5 6 7 window size. 8. 9 10 11. (a) (b) Figure 5. Effect of feasibility check window. (a) 5 processors, (b) 8 processors.. Guarantee Ratio. 0.78 0.76 0.74 0.72 0.7. 1 0.995 Guarantee Ratio. HDMA (m=5) HDMA (m=6) HDMA (m=7) HDMA (m=8) HDMA (m=9). 0.8. 0.99 HDMA (m=5) HDMA (m=6) HDMA (m=7) HDMA (m=8) HDMA (m=9). 0.985 0.98 0.975. 0.68 0.66. 0.97. 3. 4. 5. 6 7 8 distance. 9. 3. 4. 5. 6 7 distance. 8. 9. (a) (b) Figure 6. Effect of task distance. (a) laxity = 3, (b) laxity = 5. with increasing distance. The reason is larger. heterogeneous system and construct a simulation. distance make more consecutive primaries (or. environment to evaluate them. These algorithms. backups) be considered simultaneously, which. are. helps to fully utilize all processors.. algorithms and aim at enhancing the guarantee. modified. and extended from. existed. ratio without increasing the time complexity.. 5 Conclusions In this paper, we propose three faulttolerant task scheduling algorithms used in. Based on our simulation, all of them can reach expected results. Besides, FTMA can obtain reasonable. performances. using. smaller.

(8) feasibility check window, which means it is an. Software Engineering, Vol. 12, No. 1, pp.. effective and efficient algorithm.. 79-86, Jan. 1986. [8] Y. Oh and S. Son, “Multiprocessor Support. References. for Real-time Fault-tolerant Scheduling”,. [1] R. Al-Omari, G. Manimaran, and Arun K.. Proc. of IEEE Workshop Architectural. Somani, “An Efficient Backup-overloading. Aspects of Real-time Systems, pp. 76-80,. for Fault-tolerant Scheduling of Real-time. Dec. 1991.. Tasks”, Proc. of International Parallel and. [9] K. Ramamritham and J. A. Stankovic,. Distributed Processing Symposium, pp.. “Scheduling Algorithms. 1291-1295, 2000.. Systems Support for Real-time Systems”,. [2] R. Al-Omari, Arun K. Somani, and G. Manimaran, “A New Fault-tolerant Techni-. and. Operating. Proc. of IEEE, Vol. 82, No. 1, pp. 55-67, Jan. 1994.. que for Improving Schedulability in Multi-. [10] K. Ramamritham, J. A. Stankovic, and P.-F.. processor Real-time Systems”, Proc. of. Shiah, “Efficient Scheduling Algorithms for. International Parallel and Distributed Pro-. Real-time Multiprocessor Systems”, IEEE. cessing Symposium, pp. 32-39, April 2001.. Trans. on Parallel and Distributed Systems,. [3] S. Ghosh, R. Melhem, and D. Mosse,. Vol. 1, No. 2, pp. 184-194, April 1990.. “Fault-tolerance Through Scheduling of. [11] P. Ramanathan, “Graceful Degradation in. Aperiodic Tasks in Hard Real-time Multi-. Real-time Control Applications Using (m,. processor. k)-firm. Systems”,. IEEE. Trans.. on. Guarantee”,. Proc.. of. IEEE. Parallel and Distributed Systems, Vol. 8,. Fault-tolerant Computing Symposium, pp.. No. 3, pp. 272-284, March 1997.. 132-141, 1997.. [4] A. L. Liestman and R. H. Campbell, “A. [12] K. G. Shan and P. Ramanathan, “Real-time. Fault-tolerant Scheduling Problem”, IEEE. Computing: A New Discipline of Computer. Trans. on Software Engineering, Vol. 12,. Science and Engineering”, Proc. of IEEE,. No. 11, pp. 1089-1095, Nov. 1988.. Vol. 82, No. 1, pp. 6-24, Jan. 1994.. [5] J. W. S. Liu, W. K. Shih, K. J. Lin, R.. [13] T. Tsuchiya, Y. Kakuda, and T. Kikuno, “A. Bettati, and J. Y. Chung”, “Imprecise. New Fault-tolerant Scheduling Technique. Computations”, Proc. of IEEE, Vol. 82, No.. for Real-time Multiprocessor Systems”,. 1, pp. 83-94, Jan. 1994.. Proc. of 2nd International Workshop on. [6] G. Manimaran and C. Siva Ram Murthy, “A Fault-tolerant Dynamic Scheduling Algorithm for Multiprocessor Real-time Systems. Real-time. Computing. Systems. and. Applications, pp. 197-202, Oct. 1995. [14] X. Qin, H. Jiang, and D. R. Swanson, “An. and Its Analysis”, IEEE Trans. on Parallel. Efficient. and Distributed Systems, Vol. 9, No. 11, pp.. Algorithm. 1137-1152, Nov. 1998.. Precedence Constraints in Heterogeneous. [7] L. V. Mancini, “Modular Redundancy in a Message Passing System”, IEEE Trans. on. Fault-tolerant for. Real-time. Scheduling Tasks. with. Systems”, Proc. of International Conference on Parallel Processing, pp. 360-368, 2002..

(9)

參考文獻

相關文件

z Choose a delivery month that is as close as possible to, but later than, the end of the life of the hedge. z When there is no futures contract on the asset being hedged, choose

• CEPC design has to maintain the possibility for SPPC, but there is no need now to firmly prove the feasibility of SPPC,.. scientifically

If P6=NP, then for any constant ρ ≥ 1, there is no polynomial-time approximation algorithm with approximation ratio ρ for the general traveling-salesman problem...

Continue to serve as statements of curriculum intentions setting out more precisely student achievement as a result of the curriculum.

In implementing the key tasks, schools should build on past experiences and strengthen the development of the key tasks in line with the stage of the curriculum reform, through

Although many excellent resource synchronization protocols have been pro- posed, most of them are either for hard real-time task scheduling with the maxi- mum priority inversion

Tailor-making Assessment items based on texts suitable for your students may help bridge them with the tasks that they meet with. in the public

 BayesTyping1 can tolerate sequencing errors, wh ich are introduced by the PacBio sequencing tec hnology, and noise reads, which are introduced by false barcode identi cations to