60 likes | 226 Views
Lab 3: Scheduling - Session 10 -. Peter Marwedel Heiko Falk TU Dortmund Informatik 12 Germany. Rate monotonic scheduling.
E N D
Lab 3: Scheduling- Session 10 - Peter Marwedel Heiko Falk TU Dortmund Informatik 12 Germany
Rate monotonic scheduling • 1. Exercise:Assume a system of two periodic tasks. Task 1 has a period of 5 units and an execution time of 3. Task 2 has a period of 8 and an execution time of 3. Let the deadline be equal to its period. • Using rate monotonic scheduling, can any of the two processes miss its deadline? Construct a formal argumentation answering this question, based on the formula about the utilization of a processor when using rate monotonic scheduling. • Which schedule is generated by rate monotonic scheduling for the above two tasks? Draw a diagram where the x-axis reflects the time and the y-axis lists all tasks. Put vertical lines in the diagram at those points of time where tasks become available. Draw rectangles for those times where tasks are really executed. Mark all those points of time where deadlines are missed, if this ever happens. When scheduling, assume that the execution of a task that has just missed its deadline is not caught up. • Verify your drawn schedule by using the software leviRTS.
EDF • 2. Exercise:Consider the following set of tasks whereAn denotes the arrival time,dn denotes the deadline andcn denotes the execution time: • Create a schedule of the above tasks using least laxity. Draw a diagram like in exercise 1 showing when which task becomes active. Is there a task missing its deadline? • Create a schedule of the above tasks using earliest deadline first. Draw a diagram like in exercise 1 showing when which task becomes active. Is there a task missing its deadline? • Verify your EDF schedule by making leviRTS produce the desired schedule.
Latest Deadline First • 3. Exercise:Assume a system of five interdependent tasks T1 to T5. The dependencies between the tasks are described by the task graph below (Note: an edge TiTj means that task Tj can only be executed if Ti has finished execution). cn denotes the execution time of a task and dn denotes the deadline interval of a task. • T1 with c1 = 2 and d1 = 15, • T2 with c2 = 5 and d2 = 20, • T3 with c3 = 4 and d3 = 12, • T4 with c4 = 3 and d3 = 15, • T5 with c5 = 3 and d5 = 20 Schedule this task set using latest deadline first. T2 T3 T5 T1 T4
Resource Access Protocols • 4. Exercise:A task set consisting of tasks T1,T2, T3 and T4 should be executedon a processor with the followingpriorities: P1 = 4 (lowest), P2 = 3,P3 = 2, P4 = 1 (highest). The tableshows the values for the arrivaltimes, execution times and theresource accesses for each task. • Generate an empty task scenario in the software leviRTS and select the algorithm Resource Access Protocol (priority based, preemptive). Create the tasks T1 to T4 with the above properties. • Start the visualization of this scenario. Which problems occur during scheduling? What can be done to solve them? • Draw (manually) a schedule of the above tasks under the assumption that priority inheritance is used. Verify your drawn schedule using leviRTS.