CIS 4930/6930: Principles of Cyber-Physical Systems
|
|
- Edward Ryan
- 6 years ago
- Views:
Transcription
1 CIS 4930/6930: Principles of Cyber-Physical Systems Chapter 11 Scheduling Hao Zheng Department of Computer Science and Engineering University of South Florida H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 1 / 44
2 Functions of an Operating System (or Microkernel) Memory management File system Networking Security Input and output (interrupt handling) Synchronization (semaphores and locks) Scheduling of threads or processes H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 2 / 44
3 Functions of an Operating System (or Microkernel) Memory management File system Networking Security Input and output (interrupt handling) Synchronization (semaphores and locks) Scheduling of threads or processes Creation and termination of threads Timing of thread activations H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 2 / 44
4 Real-time Systems A real-time system includes timing constraints such as: Physical-time deadlines by which a task must be completed. Requirements that a task must occur no earlier than a particular time. A task must occur a set time after another task. A task must occur periodically at some specified period. Tasks may be dependent on one another or simply share a processor. All of these cases require a careful scheduling strategy. k 6 H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 3 / 44
5 11.1 Basics of Scheduling: Scheduling Decisions A scheduling decision has three parts: Assignment: which processor should execute the task. Ordering: in what order each processor should execute its tasks. Timing: the time at which each task executes. Decisions may be at design time or run time. A fully-static scheduler makes all decisions at design time (no locks). A static order scheduler defers timing to run time (may block on lock). A static assignment scheduler defers ordering and timing to run time. A fully-dynamic scheduler makes all decisions at run time. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 4 / 44
6 11.1 Basics of Scheduling: Scheduling Decisions A non-preemptive scheduler dispatches when current thread completes. A preemptive scheduler may make a scheduling decision during execution of a task Upon a timer interrupt at a jiffy interval. Upon an I/O interrupt. When it attempts to acquire an unavailable lock, and resumed when another task releases the lock. When it releases a lock, if a higher priority thread requires the lock. When the current thread makes any OS call. File system access Network access... H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 5 / 44
7 Task Models The set of assumptions is called the task model of the scheduler. Assume a finite number of tasks that may or may not terminate. Real-time systems often assume that tasks terminate. Some schedulers can assume that All tasks are known before scheduling begins, or New tasks can arrive dynamically. Some schedulers support scenarios where each task τ T executes repeatedly, possibly forever, and possibly periodically. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 6 / 44
8 Task Models Distinction between a task and its executions: When task τ T executes repeatedly, the task executions are τ 1, τ 2,.... A sporadic task repeats with irregular timing, but has a lower bound on the time between executions. If execution i must precede j, we write i < j (precedence constraint). A task may require preconditions to be satisfied before it is enabled. Availability of a lock may be a precondition for resumption of a task. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 7 / 44
9 Task Execution Times i o i e i r i s i f i d i H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 8 / 44
10 Deadlines and Priority Hard real-time scheduling has hard deadlines which are real physical constraints that are an error when missed. Soft real-time scheduling has desired deadlines which are not errors when missed. A priority-based scheduler assumes each task is assigned a number (priority) and chooses the enabled task with the highest priority. A fixed priority remains constant while a dynamic priority can change. A non-preemptive priority-based scheduler only uses the priorities to choose the next task, but never interrupts a task that is executing. A preemptive priority-based scheduler can change to a higher priority task at any time. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 9 / 44
11 Comparing Schedulers A schedule is feasible if it meets all deadlines (f i d i ). A scheduler that produces feasible schedules whenever possible is optimal with respect to feasibility. Schedulers also judged based on utilization (the percentage of time the processor is executing tasks). Optimal w.r.t feasibility schedulers deliver feasible schedules whenever the utilization is 100%. Maximum lateness is another criterion: L max = max i T (f i d i ) Total completion time is also important: M = max i T f i min i T r i H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 10 / 44
12 Implementation of a Scheduler Thread data structure: Copy of all state (machine registers). Address at which to resume executing the thread. Status of the thread (e.g. blocked on mutex). Priority, worst case execution time, and other info to assist the scheduler. Operating System: Set up periodic timer interrupts. Create default thread data structures. Dispatch a thread. Timer interrupt service routine: Setup next timer interrupt. Dispatch a thread. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 11 / 44
13 Dispatching a Thread 1 Disable interrupts. 2 Save state (registers) including the return address on the stack. 3 Save the stack pointer into the current thread data structure. 4 Determine which thread should execute (scheduling). 5 If the same one, enable interrupts and return. 6 Restore the stack pointer for the new thread. 7 Copy thread state into machine registers. 8 Replace program counter on the stack for the new thread. 9 Enable interrupts. 10 Return. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 44
14 11.2 Rate Monotonic (RM) Scheduling Assume n tasks (i.e., T = {τ 1, τ 2,... τ n }) invoked periodically where each task must complete in each period, p i. Rate monotonic schedule gives higher priority to a task with smaller period, and it is optimal with respect to feasibility. Note: important assumption is that context switch time is negligible. Liu and Leland, Scheduling algorithms for multiprogramming in a hard-real-time environment, J. ACM, 20(1), H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 13 / 44
15 Example: Two Periodic Tasks e 1 p 1 τ 1 τ 1,1 τ 1,2 τ 1,3 τ 1,4 τ 1,5 τ 1,6 τ 1,7 τ 2 τ 2,1 e 2 p 2 τ 2,2 H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 14 / 44
16 Example: Two Periodic Tasks e 1 p 1 τ 1 τ 1,1 τ 1,2 τ 1,3 τ 1,4 τ 1,5 τ 1,6 τ 1,7 τ 2 τ 2,1 τ 2,2 e 2 p 2 Is a non-preemptive schedule feasible? H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 14 / 44
17 Example: Two Periodic Tasks e 1 p 1 τ 1 τ 1,1 τ 1,2 τ 1,3 τ 1,4 τ 1,5 τ 1,6 τ 1,7 τ 2 τ 2,1 τ 2,2 e 2 p 2 Is a non-preemptive schedule feasible? No! H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 14 / 44
18 Example: Two Periodic Tasks e 1 p 1 τ 1 τ 1,1 τ 1,2 τ 1,3 τ 1,4 τ 1,5 τ 1,6 τ 1,7 τ 2 τ 2,1 τ 2,2 e 2 p 2 How about a preemptive schedule with higher priority for red task? H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 14 / 44
19 Example: Two Periodic Tasks p 1 τ 1 τ 2 + e 2 p 2 How about a preemptive schedule with higher priority for red task? Yes! H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 14 / 44
20 Worst Case Response Time τ 1 τ 2 τ 1 τ 2 τ 1 τ 2 τ 1 τ 2 o 2 H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 15 / 44
21 Non-RM Schedule Feasible p 1 e 1 τ 1 τ 2 e 2 p 2 Condition for feasibility: e 1 + e 2 p 1 H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 16 / 44
22 RM Schedule Also Feasible e 1 p 1 τ 1 τ 2 e 2 p 2 e 1 + e 2 p 1 feasible schedule H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 17 / 44
23 Comments Proof can be extended to an arbitrary number of tasks. Proof only gives optimality w.r.t. feasibility, not other optimality criteria. Practical implementation: Timer interrupt at greatest common divisor of the periods. Multiple timers. Note RM schedulers do not always achieve 100 percent utilization. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 18 / 44
24 11.3 Earliest Deadline First Jackson s earliest due date (EDD) Algorithm (1955) Given n independent one-time tasks with deadlines d 1,..., d n, schedule them to minimize the maximum lateness, defined as L max = max 1 i n {f i d i } where f i is the finishing time of task i. Note that this is negative iff all deadlines are met. Earliest Due Date (EDD) algorithm: Execute them in order of non-decreasing deadlines. Sort tasks such that d 1 d 2... d n. Then, executes τ 1, τ 2,..., τ n. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 19 / 44
25 11.3 Earliest Deadline First: EDD Note that this does not require preemption. Minimizes the maximum lateness as compared to all other possible orderings. Does not support arrival of tasks, thus no periodic or repeating tasks. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 20 / 44
26 11.3 Earliest Deadline First Horn s earliest deadline first (EDF) Algorithm (1974) extends EDD to allow tasks to arrive at any time. Given a set of n independent tasks with arbitrary arrival times, any algorithm that at any instant executes the task with the earliest absolute deadline among all arrived tasks is optimal w.r.t. minimizing the maximum lateness. EDF requires the scheduler to always execute the task with the earliest deadline among all arrived tasks. EDF has a dynamic priority making it more difficult to implement. A repeated task may be assigned with different priority at different time. EDF can be applied to periodic tasks as well as aperiodic tasks by making deadline be the end of the period. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 21 / 44
27 Comparison of EDF and RMS Favoring RMS: Scheduling decisions are simpler (fixed vs. dynamic priorities required by EDF). EDF scheduler must maintain a list of ready tasks that is sorted by priority. Favoring EDF: Since EDF is optimal w.r.t. maximum lateness, it is also optimal w.r.t. feasibility while RMS is only optimal w.r.t. feasibility. EDF can achieve full utilization where RMS fails to do that. EDF results in fewer preemptions in practice, and hence less overhead for context switching. Deadlines can be different from the period. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 22 / 44
28 EDF with Precedences d 4 = 3 d 2 = 5 d 5 = 5 d 1 = 2 d 3 = 4 d 6 = 6 EDF LDF EDF* H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 23 / 44
29 Latest Deadline First (Lawler, 1973) Latest deadline first (LDF) builds a schedule backwards. Given a precedence graph, starting from the leaf nodes, choose a node with no other dependent nodes and with the latest deadline to be scheduled last, and work backwards. LDF is optimal in the sense that it minimizes the maximum lateness. It does not require preemption while EDF does. However, it requires that all tasks be available and their precedences known before any task is executed. Does not support arrival of tasks. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 24 / 44
30 LDF with Precedences d 2 = 5 d 4 = 3 d 5 = 5 d 1 = 2 d 3 = 4 d 6 = 6 EDF LDF EDF* H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 25 / 44
31 EDF with Precedences (Chetto et al., 1990) With a preemptive scheduler, EDF can be modified to account for precedences and to allow tasks to arrive at arbitrary times. It adjusts the deadlines and arrival times according to the precedences. For a task τ i T, modify its deadline as follows: d i = min(d i, min (d j e j )) j D(i) where D(i) T are the tasks that immediately depend on i in the precedence graph. EDF with precedences (EDF*) is optimal in the sense of minimizing the maximum lateness. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 26 / 44
32 EDF with Precedences d 2 = 5 d 4 = 3 d 5 = 5 d 1 = 2 d 3 = 4 d 6 = 6 EDF LDF EDF* H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 27 / 44
33 11.4 Scheduling and Mutual Exclusion Fixed priority scheduler always executes the enabled tasks with highest priority. When threads access shared resources, they need to use mutexes to ensure data integrity. Mutexes can also complicate scheduling. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 28 / 44
34 Mars Pathfinder H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 29 / 44
35 Priority Inversion: A Hazard with Mutexes task 1 task 2 task 3 acquire lock preempt block preempt task 1 blocked release done Task 1 has highest priority, task 3 lowest. Task 3 acquires a lock on a shared object, entering a critical section. It gets preempted by task 1, which then tries to acquire the lock and blocks. Task 2 preempts task 3 at time 4, keeping the higher priority task 1 blocked for an unbounded amount of time. In effect, the priorities of tasks 1 and 2 get inverted, since task 2 can keep task 1 waiting arbitrarily long. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 30 / 44
36 Priority Inheritance Protocol (PIP) When a task blocks attempting to acquire a lock, the task holding the lock inherits the priority of the blocked task. task 1 blocked task 1 task 2 task 3 acquire lock preempt block at priority of 1 task 2 preempted release done done H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 31 / 44
37 Priority Ceiling Protocol Priorities can be used to remove certain kinds of deadlocks. task 1 acquire lock a preempt acquire lock b b block on a task 2 a a block on b H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 32 / 44
38 Priority Ceiling Protocol (PCP) Every lock or semaphore is assigned a priority ceiling equal to the priority of the highest-priority task that can lock it. Can one automatically compute the priority ceiling? A task τ can acquire a lock only if the task s priority is strictly higher than the priority ceilings of all locks currently held by other tasks. Intuition: task τ will not later try to acquire these locks held by other tasks. Locks that are not held by any task don t affect the task. This prevents deadlocks. There are extensions supporting dynamic priorities and dynamic creations of locks. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 33 / 44
39 Priority Ceiling Protocol (PCP) prevented from locking b by priority ceiling protocol task 1 b a lock a preempt unlock b, then a task 2 a a b H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 34 / 44
40 11.5 Multiprocessor Scheduling Scheduling a fixed finite set of tasks with precedence on a finite number of processors with goal to minimize execution time is NP-hard. Hu level scheduling algorithm assigns priority to task τ based on the level. Level is the greatest sum of execution times of tasks on a path in the precedence graph from τ to another task with no dependents. It is a critical path method that is not optimal, but approximates an optimal solution for most graphs. List scheduler assigns tasks to processors based on priorities. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 35 / 44
41 Precedence Example Revisited d 4 = 3 d 2 = 5 d 5 = 5 d 1 = 2 d 3 = 4 d 6 = 6 EDF LDF EDF* H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 36 / 44
42 A Two Processor Parallel Schedule Processor A: Processor B: H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 37 / 44
43 Scheduling Anomalies and Brittleness All thread scheduling algorithms are brittle (i.e., small changes can have big, unexpected consequences). Let us consider a schedule for a multiprocessor (or multicore). Theorem (Richard Graham, 1976): If a task set with fixed priorities, execution times, and precedence constraints is scheduled according to priorities on a fixed number of processors, then increasing the number of processors, reducing execution times, or weakening precedence constraints can increase the schedule length. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 38 / 44
44 Richard s Anomalies e 1 = 3 e 2 = 2 e 3 = 2 e 4 = 2 e 9 = 9 e 8 = 4 e 7 = 4 e 6 = 4 e 5 = 4 proc1 proc2 proc time H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 39 / 44
45 Richard s Anomalies: Smaller Computation Time e 1 = 3 e 2 = 2 e 3 = 2 e 4 = 2 e 9 = 9 e 8 = 4 e 7 = 4 e 6 = 4 e 5 = 4 proc1 proc2 proc proc proc proc time time H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 40 / 44
46 Richard s Anomalies: More Processors e 1 = 3 e 9 = 9 e 2 = 2 e 3 = 2 e 4 = 2 e 8 = 4 e 7 = 4 e 6 = 4 e 5 = 4 proc1 proc2 proc3 proc4 1 proc1 2 proc2 3 proc time time H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 41 / 44
47 Richard s Anomalies: Less Precedences Suppose precedences between task 4 and tasks 7 and 8 are removed. e 1 = 3 e 9 = 9 e 2 = 2 e 3 = 2 e 4 = 2 e 8 = 4 e 7 = 4 e 6 = 4 proc1 proc2 proc3 1 8 proc proc2 3 proc e 5 = time time Remove precedences between task 4 and tasks 7 and 8. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 42 / 44
48 Richard s Anomalies with Mutexes proc1 proc time proc1 proc time H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 43 / 44
49 Concluding Remarks Scheduling is inherently difficult SW execution time hardly to predict accurately. The actual dynamic behavior can be quite different. Timing behavior under all known task scheduling strategies is brittle. Small changes can have big (and unexpected) consequences. Unfortunately, since execution times are so hard to predict, such brittleness can result in unexpected system failures. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 44 / 44
Embedded Systems 15. REVIEW: Aperiodic scheduling. C i J i 0 a i s i f i d i
Embedded Systems 15-1 - REVIEW: Aperiodic scheduling C i J i 0 a i s i f i d i Given: A set of non-periodic tasks {J 1,, J n } with arrival times a i, deadlines d i, computation times C i precedence constraints
More informationEmbedded Systems 14. Overview of embedded systems design
Embedded Systems 14-1 - Overview of embedded systems design - 2-1 Point of departure: Scheduling general IT systems In general IT systems, not much is known about the computational processes a priori The
More informationLecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan
Lecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan Note 6-1 Mars Pathfinder Timing Hiccups? When: landed on the
More informationLecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013
Lecture 3 Real-Time Scheduling Daniel Kästner AbsInt GmbH 203 Model-based Software Development 2 SCADE Suite Application Model in SCADE (data flow + SSM) System Model (tasks, interrupts, buses, ) SymTA/S
More informationReal-Time Systems. Event-Driven Scheduling
Real-Time Systems Event-Driven Scheduling Hermann Härtig WS 2018/19 Outline mostly following Jane Liu, Real-Time Systems Principles Scheduling EDF and LST as dynamic scheduling methods Fixed Priority schedulers
More informationTask Models and Scheduling
Task Models and Scheduling Jan Reineke Saarland University June 27 th, 2013 With thanks to Jian-Jia Chen at KIT! Jan Reineke Task Models and Scheduling June 27 th, 2013 1 / 36 Task Models and Scheduling
More informationAperiodic Task Scheduling
Aperiodic Task Scheduling Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 12 Germany Springer, 2010 2017 年 11 月 29 日 These slides use Microsoft clip arts. Microsoft copyright
More informationEmbedded Systems Development
Embedded Systems Development Lecture 3 Real-Time Scheduling Dr. Daniel Kästner AbsInt Angewandte Informatik GmbH kaestner@absint.com Model-based Software Development Generator Lustre programs Esterel programs
More informationReal-Time Systems. Event-Driven Scheduling
Real-Time Systems Event-Driven Scheduling Marcus Völp, Hermann Härtig WS 2013/14 Outline mostly following Jane Liu, Real-Time Systems Principles Scheduling EDF and LST as dynamic scheduling methods Fixed
More informationNetworked Embedded Systems WS 2016/17
Networked Embedded Systems WS 2016/17 Lecture 2: Real-time Scheduling Marco Zimmerling Goal of Today s Lecture Introduction to scheduling of compute tasks on a single processor Tasks need to finish before
More informationReal-Time Scheduling and Resource Management
ARTIST2 Summer School 2008 in Europe Autrans (near Grenoble), France September 8-12, 2008 Real-Time Scheduling and Resource Management Lecturer: Giorgio Buttazzo Full Professor Scuola Superiore Sant Anna
More informationEmbedded Systems - FS 2018
Institut für Technische Informatik und Kommunikationsnetze Prof. L. Thiele Embedded Systems - FS 2018 Sample solution to Exercise 3 Discussion Date: 11.4.2018 Aperiodic Scheduling Task 1: Earliest Deadline
More informationReal-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2
Real-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2 Lecture Outline Scheduling periodic tasks The rate monotonic algorithm Definition Non-optimality Time-demand analysis...!2
More informationReal-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm
Real-time operating systems course 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm Definitions Scheduling Scheduling is the activity of selecting which process/thread should
More informationShared resources. Sistemi in tempo reale. Giuseppe Lipari. Scuola Superiore Sant Anna Pisa -Italy
istemi in tempo reale hared resources Giuseppe Lipari cuola uperiore ant Anna Pisa -Italy inher.tex istemi in tempo reale Giuseppe Lipari 7/6/2005 12:35 p. 1/21 Interacting tasks Until now, we have considered
More informationReal-Time and Embedded Systems (M) Lecture 5
Priority-driven Scheduling of Periodic Tasks (1) Real-Time and Embedded Systems (M) Lecture 5 Lecture Outline Assumptions Fixed-priority algorithms Rate monotonic Deadline monotonic Dynamic-priority algorithms
More informationReal Time Operating Systems
Real Time Operating ystems hared Resources Luca Abeni Credits: Luigi Palopoli, Giuseppe Lipari, and Marco Di Natale cuola uperiore ant Anna Pisa -Italy Real Time Operating ystems p. 1 Interacting Tasks
More informationReal Time Operating Systems
Real Time Operating ystems Luca Abeni luca.abeni@unitn.it Interacting Tasks Until now, only independent tasks... A job never blocks or suspends A task only blocks on job termination In real world, jobs
More informationCSE 380 Computer Operating Systems
CSE 380 Computer Operating Systems Instructor: Insup Lee & Dianna Xu University of Pennsylvania, Fall 2003 Lecture Note 3: CPU Scheduling 1 CPU SCHEDULING q How can OS schedule the allocation of CPU cycles
More informationProcess Scheduling for RTS. RTS Scheduling Approach. Cyclic Executive Approach
Process Scheduling for RTS Dr. Hugh Melvin, Dept. of IT, NUI,G RTS Scheduling Approach RTS typically control multiple parameters concurrently Eg. Flight Control System Speed, altitude, inclination etc..
More informationDependency Graph Approach for Multiprocessor Real-Time Synchronization. TU Dortmund, Germany
Dependency Graph Approach for Multiprocessor Real-Time Synchronization Jian-Jia Chen, Georg von der Bru ggen, Junjie Shi, and Niklas Ueter TU Dortmund, Germany 14,12,2018 at RTSS Jian-Jia Chen 1 / 21 Multiprocessor
More informationClock-driven scheduling
Clock-driven scheduling Also known as static or off-line scheduling Michal Sojka Czech Technical University in Prague, Faculty of Electrical Engineering, Department of Control Engineering November 8, 2017
More informationNon-Preemptive and Limited Preemptive Scheduling. LS 12, TU Dortmund
Non-Preemptive and Limited Preemptive Scheduling LS 12, TU Dortmund 09 May 2017 (LS 12, TU Dortmund) 1 / 31 Outline Non-Preemptive Scheduling A General View Exact Schedulability Test Pessimistic Schedulability
More informationChe-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University
Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University } 2017/11/15 Midterm } 2017/11/22 Final Project Announcement 2 1. Introduction 2.
More informationThere are three priority driven approaches that we will look at
Priority Driven Approaches There are three priority driven approaches that we will look at Earliest-Deadline-First (EDF) Least-Slack-Time-first (LST) Latest-Release-Time-first (LRT) 1 EDF Earliest deadline
More informationNon-preemptive Fixed Priority Scheduling of Hard Real-Time Periodic Tasks
Non-preemptive Fixed Priority Scheduling of Hard Real-Time Periodic Tasks Moonju Park Ubiquitous Computing Lab., IBM Korea, Seoul, Korea mjupark@kr.ibm.com Abstract. This paper addresses the problem of
More informationLecture 6. Real-Time Systems. Dynamic Priority Scheduling
Real-Time Systems Lecture 6 Dynamic Priority Scheduling Online scheduling with dynamic priorities: Earliest Deadline First scheduling CPU utilization bound Optimality and comparison with RM: Schedulability
More informationReal-Time Scheduling. Real Time Operating Systems and Middleware. Luca Abeni
Real Time Operating Systems and Middleware Luca Abeni luca.abeni@unitn.it Definitions Algorithm logical procedure used to solve a problem Program formal description of an algorithm, using a programming
More informationPeriodic scheduling 05/06/
Periodic scheduling T T or eriodic scheduling, the best that we can do is to design an algorithm which will always find a schedule if one exists. A scheduler is defined to be otimal iff it will find a
More informationReal-Time Systems. Lecture 4. Scheduling basics. Task scheduling - basic taxonomy Basic scheduling techniques Static cyclic scheduling
Real-Time Systems Lecture 4 Scheduling basics Task scheduling - basic taxonomy Basic scheduling techniques Static cyclic scheduling 1 Last lecture (3) Real-time kernels The task states States and transition
More informationScheduling Slack Time in Fixed Priority Pre-emptive Systems
Scheduling Slack Time in Fixed Priority Pre-emptive Systems R.I.Davis Real-Time Systems Research Group, Department of Computer Science, University of York, England. ABSTRACT This report addresses the problem
More informationResource Sharing in an Enhanced Rate-Based Execution Model
In: Proceedings of the 15th Euromicro Conference on Real-Time Systems, Porto, Portugal, July 2003, pp. 131-140. Resource Sharing in an Enhanced Rate-Based Execution Model Xin Liu Steve Goddard Department
More informationReal-Time Systems. Lecture #14. Risat Pathan. Department of Computer Science and Engineering Chalmers University of Technology
Real-Time Systems Lecture #14 Risat Pathan Department of Computer Science and Engineering Chalmers University of Technology Real-Time Systems Specification Implementation Multiprocessor scheduling -- Partitioned
More information3. Scheduling issues. Common approaches 3. Common approaches 1. Preemption vs. non preemption. Common approaches 2. Further definitions
Common approaches 3 3. Scheduling issues Priority-driven (event-driven) scheduling This class of algorithms is greedy They never leave available processing resources unutilized An available resource may
More informationEDF Feasibility and Hardware Accelerators
EDF Feasibility and Hardware Accelerators Andrew Morton University of Waterloo, Waterloo, Canada, arrmorton@uwaterloo.ca Wayne M. Loucks University of Waterloo, Waterloo, Canada, wmloucks@pads.uwaterloo.ca
More informationAndrew Morton University of Waterloo Canada
EDF Feasibility and Hardware Accelerators Andrew Morton University of Waterloo Canada Outline 1) Introduction and motivation 2) Review of EDF and feasibility analysis 3) Hardware accelerators and scheduling
More informationImproved Priority Assignment for the Abort-and-Restart (AR) Model
Improved Priority Assignment for the Abort-and-Restart (AR) Model H.C. Wong and A. Burns Department of Computer Science, University of York, UK. February 1, 2013 Abstract This paper addresses the scheduling
More informationCPU scheduling. CPU Scheduling
EECS 3221 Operating System Fundamentals No.4 CPU scheduling Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University CPU Scheduling CPU scheduling is the basis of multiprogramming
More informationTDDB68 Concurrent programming and operating systems. Lecture: CPU Scheduling II
TDDB68 Concurrent programming and operating systems Lecture: CPU Scheduling II Mikael Asplund, Senior Lecturer Real-time Systems Laboratory Department of Computer and Information Science Copyright Notice:
More informationCPU SCHEDULING RONG ZHENG
CPU SCHEDULING RONG ZHENG OVERVIEW Why scheduling? Non-preemptive vs Preemptive policies FCFS, SJF, Round robin, multilevel queues with feedback, guaranteed scheduling 2 SHORT-TERM, MID-TERM, LONG- TERM
More informationSchedulability analysis of global Deadline-Monotonic scheduling
Schedulability analysis of global Deadline-Monotonic scheduling Sanjoy Baruah Abstract The multiprocessor Deadline-Monotonic (DM) scheduling of sporadic task systems is studied. A new sufficient schedulability
More informationOn-line scheduling of periodic tasks in RT OS
On-line scheduling of periodic tasks in RT OS Even if RT OS is used, it is needed to set up the task priority. The scheduling problem is solved on two levels: fixed priority assignment by RMS dynamic scheduling
More informationReal-Time Scheduling
1 Real-Time Scheduling Formal Model [Some parts of this lecture are based on a real-time systems course of Colin Perkins http://csperkins.org/teaching/rtes/index.html] Real-Time Scheduling Formal Model
More informationScheduling I. Today Introduction to scheduling Classical algorithms. Next Time Advanced topics on scheduling
Scheduling I Today Introduction to scheduling Classical algorithms Next Time Advanced topics on scheduling Scheduling out there You are the manager of a supermarket (ok, things don t always turn out the
More informationTDDI04, K. Arvidsson, IDA, Linköpings universitet CPU Scheduling. Overview: CPU Scheduling. [SGG7] Chapter 5. Basic Concepts.
TDDI4 Concurrent Programming, Operating Systems, and Real-time Operating Systems CPU Scheduling Overview: CPU Scheduling CPU bursts and I/O bursts Scheduling Criteria Scheduling Algorithms Multiprocessor
More informationUniprocessor real-time scheduling
Uniprocessor real-time scheduling Julien Forget Université Lille 1 Ecole d Été Temps Réel - 30 Août 2017 Julien Forget (Université Lille 1) Uniprocessor real-time scheduling ETR 2017 1 / 67 Overview At
More informationScheduling. Uwe R. Zimmer & Alistair Rendell The Australian National University
6 Scheduling Uwe R. Zimmer & Alistair Rendell The Australian National University References for this chapter [Bacon98] J. Bacon Concurrent Systems 1998 (2nd Edition) Addison Wesley Longman Ltd, ISBN 0-201-17767-6
More informationRUN-TIME EFFICIENT FEASIBILITY ANALYSIS OF UNI-PROCESSOR SYSTEMS WITH STATIC PRIORITIES
RUN-TIME EFFICIENT FEASIBILITY ANALYSIS OF UNI-PROCESSOR SYSTEMS WITH STATIC PRIORITIES Department for Embedded Systems/Real-Time Systems, University of Ulm {name.surname}@informatik.uni-ulm.de Abstract:
More informationOptimal Utilization Bounds for the Fixed-priority Scheduling of Periodic Task Systems on Identical Multiprocessors. Sanjoy K.
Optimal Utilization Bounds for the Fixed-priority Scheduling of Periodic Task Systems on Identical Multiprocessors Sanjoy K. Baruah Abstract In fixed-priority scheduling the priority of a job, once assigned,
More informationCSC501 Operating Systems Principles. Deadlock
CSC501 Operating Systems Principles Deadlock 1 Last Lecture q Priority Inversion Q Priority Inheritance Protocol q Today Q Deadlock 2 The Deadlock Problem q Definition Q A set of blocked processes each
More informationRate Monotonic Analysis (RMA)
Rate Monotonic Analysis (RMA) ktw@csie.ntu.edu.tw (Real-Time and Embedded System Laboratory) Major References: An Introduction to Rate Monotonic Analysis Tutorial Notes SEI MU* Distributed Real-Time System
More informationMultiprocessor Scheduling of Age Constraint Processes
Multiprocessor Scheduling of Age Constraint Processes Lars Lundberg Department of Computer Science, University of Karlskrona/Ronneby, Soft Center, S-372 25 Ronneby, Sweden, email: Lars.Lundberg@ide.hk-r.se
More informationResource Sharing Protocols for Real-Time Task Graph Systems
Resource Sharing Protocols for Real-Time Task Graph Systems Nan Guan, Pontus Ekberg, Martin Stigge, Wang Yi Uppsala University, Sweden Northeastern University, China Abstract Previous works on real-time
More informationModule 5: CPU Scheduling
Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 5.1 Basic Concepts Maximum CPU utilization obtained
More informationScheduling I. Today. Next Time. ! Introduction to scheduling! Classical algorithms. ! Advanced topics on scheduling
Scheduling I Today! Introduction to scheduling! Classical algorithms Next Time! Advanced topics on scheduling Scheduling out there! You are the manager of a supermarket (ok, things don t always turn out
More informationScheduling Periodic Real-Time Tasks on Uniprocessor Systems. LS 12, TU Dortmund
Scheduling Periodic Real-Time Tasks on Uniprocessor Systems Prof. Dr. Jian-Jia Chen LS 12, TU Dortmund 08, Dec., 2015 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 1 / 38 Periodic Control System Pseudo-code
More informationReal-Time Systems. LS 12, TU Dortmund
Real-Time Systems Prof. Dr. Jian-Jia Chen LS 12, TU Dortmund April 24, 2014 Prof. Dr. Jian-Jia Chen (LS 12, TU Dortmund) 1 / 57 Organization Instructor: Jian-Jia Chen, jian-jia.chen@cs.uni-dortmund.de
More informationPriority-driven Scheduling of Periodic Tasks (1) Advanced Operating Systems (M) Lecture 4
Priority-driven Scheduling of Periodic Tasks (1) Advanced Operating Systems (M) Lecture 4 Priority-driven Scheduling Assign priorities to jobs, based on their deadline or other timing constraint Make scheduling
More informationReal-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3
Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3 Lecture Outline The rate monotonic algorithm (cont d) Maximum utilisation test The deadline monotonic algorithm The earliest
More informationChapter 6: CPU Scheduling
Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 Basic Concepts Maximum CPU utilization obtained
More informationSchedulability Analysis for the Abort-and-Restart Model
Schedulability Analysis for the Abort-and-Restart Model Hing Choi Wong Doctor of Philosophy University of York Computer Science December 2014 Abstract In real-time systems, a schedulable task-set guarantees
More informationReal-time Systems: Scheduling Periodic Tasks
Real-time Systems: Scheduling Periodic Tasks Advanced Operating Systems Lecture 15 This work is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License. To view a copy of
More informationOperating Systems. VII. Synchronization
Operating Systems VII. Synchronization Ludovic Apvrille ludovic.apvrille@telecom-paristech.fr Eurecom, office 470 http://soc.eurecom.fr/os/ @OS Eurecom Outline Synchronization issues 2/22 Fall 2017 Institut
More informationBounding the End-to-End Response Times of Tasks in a Distributed. Real-Time System Using the Direct Synchronization Protocol.
Bounding the End-to-End Response imes of asks in a Distributed Real-ime System Using the Direct Synchronization Protocol Jun Sun Jane Liu Abstract In a distributed real-time system, a task may consist
More informationProcess Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times
Scheduling The objective of multiprogramming is to have some process running all the time The objective of timesharing is to have the switch between processes so frequently that users can interact with
More informationScheduling Lecture 1: Scheduling on One Machine
Scheduling Lecture 1: Scheduling on One Machine Loris Marchal October 16, 2012 1 Generalities 1.1 Definition of scheduling allocation of limited resources to activities over time activities: tasks in computer
More informationA Theory of Rate-Based Execution. A Theory of Rate-Based Execution
Kevin Jeffay Department of Computer Science University of North Carolina at Chapel Hill jeffay@cs cs.unc.edu Steve Goddard Computer Science & Engineering University of Nebraska Ð Lincoln goddard@cse cse.unl.edu
More informationThe FMLP + : An Asymptotically Optimal Real-Time Locking Protocol for Suspension-Aware Analysis
The FMLP + : An Asymptotically Optimal Real-Time Locking Protocol for Suspension-Aware Analysis Björn B. Brandenburg Max Planck Institute for Software Systems (MPI-SWS) Abstract Multiprocessor real-time
More informationLec. 7: Real-Time Scheduling
Lec. 7: Real-Time Scheduling Part 1: Fixed Priority Assignment Vijay Raghunathan ECE568/CS590/ECE495/CS490 Spring 2011 Reading List: RM Scheduling 2 [Balarin98] F. Balarin, L. Lavagno, P. Murthy, and A.
More informationSelected solutions for. TDDD07 Real-time Systems
Selected solutions for TDDD07 Real-time Systems Massimiliano Raciti Jordi ucurull Simin Nadjm-Tehrani Scheduling and resource sharing Real-Time Systems Laboratory Department of omputer and Information
More informationCHAPTER 5 - PROCESS SCHEDULING
CHAPTER 5 - PROCESS SCHEDULING OBJECTIVES To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various CPU-scheduling algorithms To discuss evaluation criteria
More informationReal-time scheduling of sporadic task systems when the number of distinct task types is small
Real-time scheduling of sporadic task systems when the number of distinct task types is small Sanjoy Baruah Nathan Fisher Abstract In some real-time application systems, there are only a few distinct kinds
More informationExam Spring Embedded Systems. Prof. L. Thiele
Exam Spring 20 Embedded Systems Prof. L. Thiele NOTE: The given solution is only a proposal. For correctness, completeness, or understandability no responsibility is taken. Sommer 20 Eingebettete Systeme
More informationCSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song
CSCE 313 Introduction to Computer Systems Instructor: Dezhen Song Schedulers in the OS CPU Scheduling Structure of a CPU Scheduler Scheduling = Selection + Dispatching Criteria for scheduling Scheduling
More informationDeadline-driven scheduling
Deadline-driven scheduling Michal Sojka Czech Technical University in Prague, Faculty of Electrical Engineering, Department of Control Engineering November 8, 2017 Some slides are derived from lectures
More informationRate-monotonic scheduling on uniform multiprocessors
Rate-monotonic scheduling on uniform multiprocessors Sanjoy K. Baruah The University of North Carolina at Chapel Hill Email: baruah@cs.unc.edu Joël Goossens Université Libre de Bruxelles Email: joel.goossens@ulb.ac.be
More informationAn Improved Schedulability Test for Uniprocessor. Periodic Task Systems
An Improved Schedulability Test for Uniprocessor Periodic Task Systems UmaMaheswari C. Devi Department of Computer Science, University of North Carolina, Chapel Hill, NC 27599-375 December 2002 Abstract
More informationSimple Dispatch Rules
Simple Dispatch Rules We will first look at some simple dispatch rules: algorithms for which the decision about which job to run next is made based on the jobs and the time (but not on the history of jobs
More informationLSN 15 Processor Scheduling
LSN 15 Processor Scheduling ECT362 Operating Systems Department of Engineering Technology LSN 15 Processor Scheduling LSN 15 FCFS/FIFO Scheduling Each process joins the Ready queue When the current process
More informationEECS 571 Principles of Real-Time Embedded Systems. Lecture Note #7: More on Uniprocessor Scheduling
EECS 571 Principles of Real-Time Embedded Systems Lecture Note #7: More on Uniprocessor Scheduling Kang G. Shin EECS Department University of Michigan Precedence and Exclusion Constraints Thus far, we
More informationOn the Soft Real-Time Optimality of Global EDF on Multiprocessors: From Identical to Uniform Heterogeneous
On the Soft Real-Time Optimality of Global EDF on Multiprocessors: From Identical to Uniform Heterogeneous Kecheng Yang and James H. Anderson Department of Computer Science, University of North Carolina
More informationTask Reweighting under Global Scheduling on Multiprocessors
ask Reweighting under Global Scheduling on Multiprocessors Aaron Block, James H. Anderson, and UmaMaheswari C. Devi Department of Computer Science, University of North Carolina at Chapel Hill March 7 Abstract
More informationCEC 450 Real-Time Systems
E 450 Real-ime Systems Lecture 4 Rate Monotonic heory Part September 7, 08 Sam Siewert Quiz Results 93% Average, 75 low, 00 high Goal is to learn what you re not learning yet Motivation to keep up with
More informationScheduling Lecture 1: Scheduling on One Machine
Scheduling Lecture 1: Scheduling on One Machine Loris Marchal 1 Generalities 1.1 Definition of scheduling allocation of limited resources to activities over time activities: tasks in computer environment,
More informationScheduling Algorithms for Multiprogramming in a Hard Realtime Environment
Scheduling Algorithms for Multiprogramming in a Hard Realtime Environment C. Liu and J. Layland Journal of the ACM, 20(1):46--61, January 1973. 2 Contents 1. Introduction and Background 2. The Environment
More informationNon-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions
Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions Mitra Nasri Chair of Real-time Systems, Technische Universität Kaiserslautern, Germany nasri@eit.uni-kl.de
More informationCPU Scheduling. CPU Scheduler
CPU Scheduling These slides are created by Dr. Huang of George Mason University. Students registered in Dr. Huang s courses at GMU can make a single machine readable copy and print a single copy of each
More informationStatic priority scheduling
Static priority scheduling Michal Sojka Czech Technical University in Prague, Faculty of Electrical Engineering, Department of Control Engineering November 8, 2017 Some slides are derived from lectures
More informationGlobal Real-Time Semaphore Protocols: A Survey, Unified Analysis, and Comparison
Global Real-Time Semaphore Protocols: A Survey, Unified Analysis, and Comparison Maolin Yang Alexander Wieder Björn B. Brandenburg Max Planck Institute for Software Systems (MPI-SWS) University of Electronic
More informationDesign of Real-Time Software
Design of Real-Time Software Reference model Reinder J. Bril Technische Universiteit Eindhoven Department of Mathematics and Computer Science System Architecture and Networking Group P.O. Box 513, 5600
More informationEDF Scheduling. Giuseppe Lipari May 11, Scuola Superiore Sant Anna Pisa
EDF Scheduling Giuseppe Lipari http://feanor.sssup.it/~lipari Scuola Superiore Sant Anna Pisa May 11, 2008 Outline 1 Dynamic priority 2 Basic analysis 3 FP vs EDF 4 Processor demand bound analysis Generalization
More informationLast class: Today: Threads. CPU Scheduling
1 Last class: Threads Today: CPU Scheduling 2 Resource Allocation In a multiprogramming system, we need to share resources among the running processes What are the types of OS resources? Question: Which
More informationTardiness Bounds under Global EDF Scheduling on a Multiprocessor
Tardiness ounds under Global EDF Scheduling on a Multiprocessor UmaMaheswari C. Devi and James H. Anderson Department of Computer Science The University of North Carolina at Chapel Hill Abstract This paper
More informationExploiting Precedence Relations in the Schedulability Analysis of Distributed Real-Time Systems
Exploiting Precedence Relations in the Schedulability Analysis of Distributed Real-Time Systems By: J.C. Palencia and M. González Harbour Departamento de Electrónica y Computadores, Universidad de Cantabria,
More informationCEC 450 Real-Time Systems
CEC 450 Real-Time Systems Lecture 3 Real-Time Services Part 2 (Rate Monotonic Theory - Policy and Feasibility for RT Services) September 7, 2018 Sam Siewert Quick Review Service Utility RM Policy, Feasibility,
More informationEDF and RM Multiprocessor Scheduling Algorithms: Survey and Performance Evaluation
1 EDF and RM Multiprocessor Scheduling Algorithms: Survey and Performance Evaluation Omar U. Pereira Zapata, Pedro Mejía Alvarez CINVESTAV-IPN, Sección de Computación Av. I.P.N. 258, Zacatenco, México,
More informationUC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara
Operating Systems Christopher Kruegel Department of Computer Science http://www.cs.ucsb.edu/~chris/ Many processes to execute, but one CPU OS time-multiplexes the CPU by operating context switching Between
More informationLoad Regulating Algorithm for Static-Priority Task Scheduling on Multiprocessors
Technical Report No. 2009-7 Load Regulating Algorithm for Static-Priority Task Scheduling on Multiprocessors RISAT MAHMUD PATHAN JAN JONSSON Department of Computer Science and Engineering CHALMERS UNIVERSITY
More informationA Dynamic Real-time Scheduling Algorithm for Reduced Energy Consumption
A Dynamic Real-time Scheduling Algorithm for Reduced Energy Consumption Rohini Krishnapura, Steve Goddard, Ala Qadi Computer Science & Engineering University of Nebraska Lincoln Lincoln, NE 68588-0115
More informationPaper Presentation. Amo Guangmo Tong. University of Taxes at Dallas January 24, 2014
Paper Presentation Amo Guangmo Tong University of Taxes at Dallas gxt140030@utdallas.edu January 24, 2014 Amo Guangmo Tong (UTD) January 24, 2014 1 / 30 Overview 1 Tardiness Bounds under Global EDF Scheduling
More information