GENERALIZED TASK SCHEDULER
|
|
- Horace Jenkins
- 6 years ago
- Views:
Transcription
1 CHAPTER 4 By Radu Muresan University of Guelph Page 1 ENGG4420 CHAPTER 4 LECTURE 4 November :49 PM GENERALIZED TASK SCHEDULER In practical applications we need to be able to schedule a mixture of periodic, aperiodic, and sporadic tasks. Assigning aperiodic and sporadic tasks to frames will affect the overall achievable utilization factor of the system. In a generalized scheduler, initially a schedule only for periodic tasks is developed; the sporadic and aperiodic tasks are scheduled in the slack time available in the frames. Slack time in a frame is the time left after the periodic tasks allocated to the frame complete. An arriving sporadic task is taken for scheduling only if enough slack time is available the task to complete before its deadline => acceptance test upon its arrival Aperiodic task do not have strict deadline The best effort can be made to schedule them in the available slack no guarantee for meeting deadlines. EFFICIENT IMPLEMETATION slack times for all frames are stored in a table and during acceptance test this table is used to check schedulability of the arriving tasks POPULAR ALTERNATIVE all sporadic and aperiodic tasks are accepted and best effort is made to meet their deadlines
2 CHAPTER 4 By Radu Muresan University of Guelph Page 2 PSEUDO CODE FOR A GENERALIZED SCHEDULER The generalized scheduler below schedules periodic, aperiodic, and sporadic tasks; it is assumed that the precomputed schedule for periodic tasks is stored in a schedulable table, and the sporadic tasks have been subjected to an acceptance test and only the tasks that have passed the test are available for scheduling cyclic-scheduler( ) { current-task T = Schedule-Table [k]; k = k + 1; //N is the total number of tasks k = k mod N; //in the schedule table dispatch-current-task (T); schedule-sporadic-tasks( ); //current task T //completed early, sporadic task can be taken schedule-aperiodic-tasks ( ); //at the end of the //frame, the running task is preempted, //if not complete idle ( ); //no task to run, idle } The cyclic scheduler routine cyclic scheduler() is activated at the end of every frame by a periodic timer
3 CHAPTER 4 By Radu Muresan University of Guelph Page 3 COMPARISON OF CYCLIC AND TABLE DRIVEN SCHEDULING A cyclic scheduler needs to set a periodic timer only once at the application initialization time; this timer continues to give an interrupt exactly at every frame boundary. In a table driven scheduling, a timer has to be set every time a task starts to run; the execution time of a typical real time task is usually of the order of a few milliseconds => a call to a timer is made every few milliseconds => degraded system performance. A CYCLIC SCHEDULER IS MORE EFFICIENT THAN A TABLE DRIVEN SCHEDULER If the overhead of setting a timer can be ignored A TABLE DRIVEN SCHEDULER IS MORE PROFICIENT than a cyclic scheduler because: The frame size must be chosen to be greater than the largest execution time of a task => processor time can be wasted when we execute tasks that have their execution times smaller than the frame size.
4 CHAPTER 4 By Radu Muresan University of Guelph Page 4 HYBRID SCHEDULERS In hybrid schedulers, the scheduling points are defined both through the clock interrupts and the event occurrences. Time-Sliced Round-Robin Scheduling Also, called processor-sharing algorithm Round-robin approach is used for scheduling time-shared applications jobs entering the queue FIFO Queue n n the job at the head of the queue enters execution for at most one time slice preempted Scheduling Algorithm ti time slice (xx ms) t1 t2 tn Job Completion Round period = n*t Where: n - number of jobs and t - time slice 1/n processor share/job ENGG4420: Real-Time Systems Design; Developed by Radu Muresan; Fall Time sliced round robin schedulers are commonly used in the traditional operating systems. A time sliced round robin scheduler is less proficient than table driven or cyclic scheduler This type of scheduler treats all task equally, and all tasks are assigned identical time slices irrespective of their priority, criticality, or closeness to their deadline. We can extend the round robins scheme and assign weights to tasks.
5 CHAPTER 4 By Radu Muresan University of Guelph Page 5 Weighted Round-Robin Approach WRR has been used for scheduling real-time traffic in high-speed switched networks jobs entering the queue FIFO Queue n n the job at the head of the queue enters execution for wt slices preempted Scheduling Algorithm t time slice (xx ms) w 1 t w 2 t w n t Job Completion Round length = (wi*t) ENGG4420: Real-Time Systems Design; Developed by Radu Muresan 29 The weighted round robin algorithm has been used for scheduling real time traffic in high speed switched networks. Rather than giving all the ready jobs equal shares of the processor, different jobs may be given different weights. Here, the weight of a job refers to the fraction of processor time allocated to the job. Specifically, a job with weight w gets w*t time slices every round, and the length of a round is equal to the sum of the weights of all the ready jobs. By adjusting the weights of the jobs, we can speed up or retard the progress of each job toward its completion.
6 CHAPTER 4 By Radu Muresan University of Guelph Page 6 EVENT DRIVEN SCHEDULING November :33 PM SHORTCOMINGS OF CYCLIC SCHEDULERS Difficult to determine a suitable frame size as well as a feasible schedule when the number of tasks is large In almost every frame some processing time is wasted (as the frame size is larger than all task execution times) resulting in sub optimal schedules Reduced proficiency in handling sporadic and aperiodic tasks EVENT DRIVEN SCHEDULERS overcome these shortcomings, however they are less efficient as they deploy more complex scheduling algorithms => eventdriven schedulers are less suitable for embedded applications as they required to be of small size, low cost, and consume minimal amount of power. In event driven schedulers, the scheduling points are defined by tasks completion and task arrival events These class of schedulers are normally preemptive, that is, a higher priority task when ready, preempts any lower priority task that may be running WE DISCUSS 3 important examples of event driven schedulers: 1) foreground background; 2) EDF; 3) RMA
7 CHAPTER 4 By Radu Muresan University of Guelph Page 7 Priority-Driven Approach (Event-Driven) The term priority-driven algorithms refers to a large class of scheduling algorithms that never leave any resources idle intentionally Priority-driven algorithms are event-driven scheduling decisions are made when events such as release and completions of jobs occur A priority-driven algorithm is greedy because it tries to make locally optimal decisions A priority-driven algorithm is list scheduling because any prioritydriven algorithm can be implemented by assigning priorities to jobs greedy scheduling Resource Availability Data List of Priorities Queues list scheduling Releases and Completions of Jobs Events Priority Driven Scheduling Algorithms ENGG4420: Real-Time Systems Design; Developed by Radu Muresan 31 A resource (processor or other type) idles only when no job requiring the resource is ready for execution. Scheduling decisions are made when events such a release and completions of jobs occur. Hence, priority driven algorithm are event driven. Other commonly used names for this approach are greedy scheduling, list scheduling and work conserving scheduling. A priority driven algorithm is greedy because it tries to make locally optimal decisions. Leaving a processor or resource idle while some job is ready to use them is not locally optimal. However, sometimes it is better to have some jobs wait even when they are ready to execute and the resources they require are available. The term list scheduling implies assigning priorities to jobs. Jobs ready for execution are placed in one or more queues ordered by the priorities of the jobs. At any scheduling decision time, the jobs with the highest priorities are scheduled and executed on the available processors. Hence, a prioritydriven scheduling algorithm is defined to a great extent by the list of priorities it assigns to jobs; the priority list and other rules, such as whether preemption is allowed, define scheduling algorithm completely. Most scheduling algorithms used in non real time systems are priority driven. Examples include: FIFO (First In First Out), LIFO (Last In First Out) which assign priorities to jobs according to their release time; SETF (Shortest Execution Time First) and LEFT (Longest Execution Time First), which are algorithm that assign priorities based on the basis of job execution time.
8 CHAPTER 4 By Radu Muresan University of Guelph Page 8 Example of Priority-Driven Approach Schedule and execute the jobs J1,, J8 on 2 processors with shared memory Task graph: Ji, k i job number k execution time J5 released at 4; all other jobs at time 0 Priority list J i > J k if i < k (a) jobs are preemptable (b) jobs are nonpreemptable J 1,3 J 2,1 J 3,2 J 4,2 J 5,2 J 6,4 (J 1, J 2,,J 8 ) J 7,4 J 8,1 Priority list P 1 J 1 J 4 J 7 J P 2 J 2 J 3 J 7 J 5 J J 4 J 5 J 6 P 1 J P 2 J 2 J 3 J 7 J ENGG4420: Real-Time Systems Design; Developed by Radu Muresan 33 (a) (b) All edges in the task graph shown represent precedence constraints. The priority list is given next to the graph: Ji has a higher priority than Jk if i < k. All the jobs are preemptable; scheduling decisions are made whenever some job becomes ready for execution or some job completes. Schedule (a) shows the schedule of jobs on the two processors generated by the priority driven algorithm following this priority assignment. At time 0, jobs J1, J2, and J7 are ready for execution. They are the only jobs in the common priority queue at this time. J1 and J2 are scheduled. The following events occur and new scheduling decisions are made: At time 1, J2 completes and hence, J3 becomes ready; J3 is placed in the priority queue ahead of J7 and is scheduled on P2 (P2 was freed by J2). At time 3, both J1 and J3 complete; J5 is still not released; J4 and J7 are scheduled. At time 4, J5 is released. Now we have 3 jobs ready. J7 has the lowest priority; consequently it is preempted and J4 and J5 have the processors. At time 5, J4 completes; J7 resumes on processor P1. At time 6, J5 completes; because J7 is not yet completed, both J6 and J8 are not ready for execution; consequently, P2 becomes idle. J7 finally completes at time 8; J6 and J8 can now be scheduled. Schedule (b) shows a non preemptive schedule according to the same priority assignment. It turns out that for this system the postponment of J5 at time 4 benefits the set of jobs as a whole. In general, nonpreemptive scheduling is not better than preemptive scheduling.
9 CHAPTER 4 By Radu Muresan University of Guelph Page 9 FOREGROUND BACKGROUND SCHEDULER Simplest priority driven preemptive scheduler Real time tasks are run as foreground tasks; The sporadic, aperiodic, and non real time tasks are run as background tasks the background tasks run at the lowest priority. Assume that we have n foreground periodic tasks T1, T2,..., Tn and one background task T B with its execution time e B. In this case the completion time ct B for the background task is given by:
10 CHAPTER 4 By Radu Muresan University of Guelph Page 10 EXAMPLE 1 Consider a real time system in which tasks are scheduled using foreground background scheduling of one foreground task T f and one background task T B. Compute the completion time for the background task if:
11 CHAPTER 4 By Radu Muresan University of Guelph Page 11 ASSIGNMENTS PROBLEM 1. In a simple priority driven preemptive scheduler, two periodic tasks T1 and T2 and a background task T3 are scheduled. The periodic task T1 has the highest priority and executes once every 20 ms and requires 10 ms of execution time each time. T2 requires 20 ms of processing every 50 ms. T3, the background task, requires 100 ms to complete. Assuming that all the tasks start at time 0, determine the time at which T3 will complete. PROBLEM 2. Suppose that in PROBLEM 1, an overload of 1 ms on account of every context switch is to be taken into account. Compute the completion time of T3.
12 CHAPTER 4 By Radu Muresan University of Guelph Page 12 EARLIEST DEADLINE FIRST (EDF) SCHEDULING November :35 PM In EDF scheduling, at every scheduling point the task having the shortest absolute deadline is taken up for scheduling. A task set is schedulable under EDF, if and only if it satisfies the condition that the total processor utilization due to the task set is less than 1. For a set of periodic real time tasks {T1, T2,..., Tn}, EDF schedulability criterion can be expressed as: EDF has been proven to be an optimal uniprocessor scheduling algorithm. If pi > di, then each task needs ei execution time every min(pi, di). Therefore, Eq (2) can be rewritten as: However, if pi < di, it is possible that a set of tasks is EDF schedulable, even when the task set fails to meet Eq. (3). Therefore, Eq. (3) is conservative in this case and is not a necessary condition, but only a sufficient condition for a given task set to be EDF schedulable.
13 CHAPTER 4 By Radu Muresan University of Guelph Page 13 EXAMPLE OF EDF SCHEDULE Consider the following task set
14 CHAPTER 4 By Radu Muresan University of Guelph Page 14 MINIMUM LAXITY FIRST (MLF) scheduling is a variant of EDF. In MLF, at every scheduling point, a laxity value is computed for every task in the system, and the task having the minimum laxity is executed first. Laxity of a task measures the amount of time that would remain if the task is taken up for execution next laxity is a measure of the flexibility available for scheduling a task. Unlike EDF, MLF takes into consideration the execution time of a task Minimum Laxity First (MLF) Algorithm Scheduler checks the slack of all the ready jobs each time a new job is released (Slack = d-t-x) and schedules based: The smaller the slack the higher the priority Ex. {T1,T2} = {(2, 0.9), (5, 2.3)} => MLF identical with EDF Ex.{T1,T2,T3} = {(2, 0.8), (5, 1.5), (5.1,1.5)} => Φi=0; Di=pi Decision Execution (Φi,pi,ei,Di) Φ=0 J1,1 J2,1 J3,1 (p1,e1) (p2,e2) (p3,e3) Decision Execution J1,2 J2,1 J3, ENGG4420: Real-Time Systems Design; Developed by Radu Muresan 96
15 CHAPTER 4 By Radu Muresan University of Guelph Page 15 EDF EXAMPLE Consider the 3 periodic real time tasks to be scheduled using EDF on a uniprocessor: T1:(20, 10); T:(50, 5); T3:(35, 10). Determine whether the task set is schedulable.
16 CHAPTER 4 By Radu Muresan University of Guelph Page 16 IS EDF REALLY A DYNAMIC PRIORITY SCHEDULING ALGORITHM If EDF were to be considered a dynamic priorityscheduling algorithm, we should be able to determine the priority value of each task at any point of time and also be able to show how it changes with time. As described, EDF scheduling does not require any priority value for any task to be computed at any time. Tasks are scheduled solely on their proximity to their deadlines However, the longer the task waits in the ready queue, the higher the chance (probability) of being taken up for scheduling => a virtual priority value associated with a task keeps increasing with time until the task is taken up for scheduling
17 CHAPTER 4 By Radu Muresan University of Guelph Page 17 EDF Algorithm (b) RM-Schedule An earliest-deadline-first schedule of (2, 0.9) and (5, 2.3) EDF algorithm: dynamic-priority algorithm assigns priorities to individual jobs in the tasks according to their absolute deadlines task-level dynamic-priority (and job-level fixed-priority) algorithm once a job is placed in the ready queue according to its priority its order with respect to other jobs in the queue remains fixed Ex: Priority of T1 is > priority of T2 from time 0 until time 4 T2 starts to have higher priority at time 4 When job J2,2 is released, T2 again has a lower priority ENGG4420: Real-Time Systems Design; Developed by Radu Muresan 95
18 CHAPTER 4 By Radu Muresan University of Guelph Page 18 IMPLEMENTATION OF EDF NAIVE IMPLEMENTATION OF EDF: a. b. c. d. e. a. b. c. Maintain all ready tasks in a queue Insert new freshly arriving tasks at the end of queue Every node in the queue will contain the Di of tasks At every preemption point the entire queue will be scanned from beginning to determine the task with the shortest deadline Complexity of the scheme: insertion of a task is achieved in O(1) or constant time; task selection (to run next) and its deletion would require O(n) time. EFFICIENT IMPLEMENTATION 1 OF EDF: a. b. c. d. Maintain all ready tasks in a sorted priority queue that can be efficiently implemented by using a heap data structure the sort criteria is in accordance to the tasks proximity to their deadline When a task arrives, a record for it can be inserted into the heap in O(log 2 n) time At every scheduling point, the next task to be run can be found at the top of the heap => O(1) time. EFFICIENT IMPLEMENTATION 2 OF EDF: Assume that the number of distinct deadlines that tasks in an application can have are restricted A separate FIFO queue is maintained for each distinct relative deadline The scheduler inserts a newly arrived task at the end of the corresponding relative deadline queue => tasks in each queue are ordered according to their absolute deadline Complexity: find the task to run is in O(1) time; time to insert a task is O(1)
19 CHAPTER 4 By Radu Muresan University of Guelph Page 19 SHORTCOMINGS OF EDF TRANSIENT OVERLOAD PROBLEM: denotes the overload of a system for a very short time. Transient overload occurs when some task takes more time to complete due to reasons such as, entering an infinite loop, entering a rarely used branch due to some abnormal input values, etc. a. When EDF is used to schedule a set of periodic real time tasks, a task overshooting its completion time can cause other task(s) to miss their deadlines. b. We can't predict which task will miss its deadline, and it can happen with the most critical task. RESOURCE SHARING PROBLEM: when EDF is used to schedule a set of real time tasks, unacceptably high overheads might have to be incurred to support resource sharing among the tasks without making tasks to miss their respective deadlines (later). EFFICIENT IMPLEMENTATION PROBLEM: the efficient implementation that assumes a restricted number of tasks with distinct deadlines is not always feasible. For a more flexible EDF algorithm, we need to keep the tasks ordered in terms of their deadlines using a priority queue.
ENGG4420 CHAPTER 4 LECTURE 3 GENERALIZED TASK SCHEDULER
CHAPTER 4 By Radu Muresan University of Guelph Page 1 ENGG4420 CHAPTER 4 LECTURE 3 November 14 12 9:44 AM GENERALIZED TASK SCHEDULER In practical applications we need to be able to schedule a mixture of
More informationCHAPTER 4 CONTENT October :10 PM
CHAPTER 4 By Radu Muresan University of Guelph Page 1 CHAPTER 4 CONTENT October 30 09 4:10 PM UNIPROCESSOR SCHEDULING Real Time Task Model Concepts Types of Real Time Tasks and Their Characteristics Task
More informationELC 4438: Embedded System Design Real-Time Scheduling
ELC 4438: Embedded System Design Real-Time Scheduling Liang Dong Electrical and Computer Engineering Baylor University Scheduler and Schedule Jobs are scheduled and allocated resources according to the
More informationClock-Driven Scheduling
NOTATIONS AND ASSUMPTIONS: UNIT-2 Clock-Driven Scheduling The clock-driven approach to scheduling is applicable only when the system is by and large deterministic, except for a few aperiodic and sporadic
More informationDEADLINE MONOTONIC ALGORITHM (DMA)
CHAPTER 4 By Radu Muresan University of Guelph Page 1 ENGG4420 CHAPTER 4 LECTURE 5 November 19 12 12:07 PM DEADLINE MONOTONIC ALGORITHM (DMA) RMA no longer remains an optimal scheduling algorithm for periodic
More informationLecture Note #4: Task Scheduling (1) EECS 571 Principles of Real-Time Embedded Systems. Kang G. Shin EECS Department University of Michigan
Lecture Note #4: Task Scheduling (1) EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan 1 Reading Assignment Liu and Layland s paper Chapter 3 of the
More informationReal-Time and Embedded Systems (M) Lecture 4
Clock-Driven Scheduling Real-Time and Embedded Systems (M) Lecture 4 Lecture Outline Assumptions and notation for clock-driven scheduling Handling periodic jobs Static, clock-driven schedules and the cyclic
More informationClock-Driven Scheduling
Integre Technical Publishing Co., Inc. Liu January 13, 2000 8:49 a.m. chap5 page 85 C H A P T E R 5 Clock-Driven Scheduling The previous chapter gave a skeletal description of clock-driven scheduling.
More informationLecture 6: Scheduling. Michael O Boyle Embedded Software
Lecture 6: Scheduling Michael O Boyle Embedded Software Overview Definitions of real time scheduling Classification Aperiodic no dependence No preemption EDD Preemption EDF Least Laxity Periodic Rate Monotonic
More informationTasks or processes attempt to control or react to external events occuring in real time RT processes must be able to keep up events
RTOS Characteristics Time constraints Shdli Scheduling C. Brandolese, W. Fornaciari Real-Time Systems Definition of real-time system A real-time system is one in which h the correctness of the computation
More information2. Scheduling issues. Common approaches /2. Common approaches /1. Common approaches / /18 UniPD - T. Vardanega 14/03/2018
Common approaches /2 2. Scheduling issues Weighted round-robin scheduling With basic round-robin (which requires preemption) All ready jobs are placed in a FIFO queue CPU time quantized, that is, allotted
More information3. Scheduling issues. Common approaches /2. Common approaches /1. Common approaches / /17 UniPD / T. Vardanega 06/03/2017
Common approaches /2 3. Scheduling issues Weighted round-robin scheduling With basic round-robin All ready jobs are placed in a FIFO queue The job at head of queue is allowed to execute for one time slice
More informationReal Time Scheduling. Real Time Scheduling. Real-Time Scheduling. Scheduling
Real Time Scheduling Process control plants, robotics, air traffic control, telecommunications Real Time Computing is defined as:- a type of computing where the correctness of the system depends not only
More informationא א א א א א א א
א א א W א א א א א א א א א 2008 2007 1 Chapter 6: CPU Scheduling Basic Concept CPU-I/O Burst Cycle CPU Scheduler Preemptive Scheduling Dispatcher Scheduling Criteria Scheduling Algorithms First-Come, First-Served
More informationCS510 Operating System Foundations. Jonathan Walpole
CS510 Operating System Foundations Jonathan Walpole Project 3 Part 1: The Sleeping Barber problem - Use semaphores and mutex variables for thread synchronization - You decide how to test your code!! We
More informationPriority-Driven Scheduling of Periodic Tasks. Why Focus on Uniprocessor Scheduling?
Priority-Driven Scheduling of Periodic asks Priority-driven vs. clock-driven scheduling: clock-driven: cyclic schedule executive processor tasks a priori! priority-driven: priority queue processor tasks
More informationCPU Scheduling. Chapter 9
CPU Scheduling 1 Chapter 9 2 CPU Scheduling We concentrate on the problem of scheduling the usage of a single processor among all the existing processes in the system The goal is to achieve High processor
More informationComp 204: Computer Systems and Their Implementation. Lecture 10: Process Scheduling
Comp 204: Computer Systems and Their Implementation Lecture 10: Process Scheduling 1 Today Deadlock Wait-for graphs Detection and recovery Process scheduling Scheduling algorithms First-come, first-served
More informationQ1. What is Real time system? Explain the basic model of Real time system. (8)
B. TECH VIII SEM I MID TERM EXAMINATION BRANCH: CSE SUB. CODE: 8CS4.2A SUBJECT: REAL TIME SYSTEM TIME ALLOWED: 2 Hours MAX. MARKS: 40 Q1. What is Real time system? Explain the basic model of Real time
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 informationCS 111. Operating Systems Peter Reiher
Operating System Principles: Scheduling Operating Systems Peter Reiher Page 1 Outline What is scheduling? What are our scheduling goals? What resources should we schedule? Example scheduling algorithms
More informationCPU Scheduling CPU. Basic Concepts. Basic Concepts. CPU Scheduler. Histogram of CPU-burst Times. Alternating Sequence of CPU and I/O Bursts
Basic Concepts CPU Scheduling CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those from an earlier What does it mean to
More informationChapter 6: CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. CPU Scheduler. Dispatcher. Alternating Sequence of CPU And I/O Bursts
Chapter 6: CPU Scheduling Basic Concepts Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Maximum CPU utilization obtained
More informationCSC 1600: Chapter 5. CPU Scheduling. Review of Process States
CSC 1600: Chapter 5 CPU Scheduling Review of Process States 1 OS Queuing Model Enter Ready queue CPU Exit Disk Queue Network Queue Printer Queue Processes enter and leave the system CPU Scheduling Each
More informationLab: Response Time Analysis using FpsCalc Course: Real-Time Systems Period: Autumn 2015
Lab: Response Time Analysis using FpsCalc Course: Real-Time Systems Period: Autumn 2015 Lab Assistant name: Jakaria Abdullah email: jakaria.abdullah@it.uu.se room: 1235 Introduction The purpose of this
More informationRoadmap. Tevfik Koşar. CSE 421/521 - Operating Systems Fall Lecture - V CPU Scheduling - I. University at Buffalo.
CSE 421/521 - Operating Systems Fall 2011 Lecture - V CPU Scheduling - I Tevfik Koşar University at Buffalo September 13 th, 2011 1 Roadmap CPU Scheduling Basic Concepts Scheduling Criteria & Metrics Different
More informationProject 2 solution code
Project 2 solution code Project 2 solution code in files for project 3: Mutex solution in Synch.c But this code has several flaws! If you copied this, we will know! Producer/Consumer and Dining Philosophers
More informationCPU Scheduling Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University
CPU Scheduling Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered Basic Concepts Scheduling Criteria Scheduling Algorithms 2 CPU Scheduler Selects
More informationLecture 11: Scheduling
Design & Co-design of Embedded Systems Lecture 11: Scheduling Sharif University of Technology Computer Engineering Dept. Winter-Spring 2008 Mehdi Modarressi Processes and operating systems Dynamic vs.
More informationOperating System 9 UNIPROCESSOR SCHEDULING
Operating System 9 UNIPROCESSOR SCHEDULING TYPES OF PROCESSOR SCHEDULING The aim of processor scheduling is to assign processes to be executed by the processor or processors over time, in a way that meets
More informationRicardo Rocha. Department of Computer Science Faculty of Sciences University of Porto
Ricardo Rocha Department of Computer Science Faculty of Sciences University of Porto Slides based on the book Operating System Concepts, 9th Edition, Abraham Silberschatz, Peter B. Galvin and Greg Gagne,
More informationCPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms. Unix Scheduler
CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms FCFS SJF RR Priority Multilevel Queue Multilevel Queue with Feedback Unix Scheduler 1 Scheduling Processes can be in one of several
More informationReal-Time Systems. Modeling Real-Time Systems
Real-Time Systems Modeling Real-Time Systems Hermann Härtig WS 2013/14 Models purpose of models describe: certain properties derive: knowledge about (same or other) properties (using tools) neglect: details
More informationCPU SCHEDULING. Scheduling Objectives. Outline. Basic Concepts. Enforcement of fairness in allocating resources to processes
Scheduling Objectives CPU SCHEDULING Enforcement of fairness in allocating resources to processes Enforcement of priorities Make best use of available system resources Give preference to processes holding
More informationCS 143A - Principles of Operating Systems
CS 143A - Principles of Operating Systems Lecture 4 - CPU Scheduling Prof. Nalini Venkatasubramanian nalini@ics.uci.edu CPU Scheduling 1 Outline Basic Concepts Scheduling Objectives Levels of Scheduling
More informationCSC 553 Operating Systems
CSC 553 Operating Systems Lecture 9 - Uniprocessor Scheduling Types of Scheduling Long-term scheduling The decision to add to the pool of processes to be executed Medium-term scheduling The decision to
More informationAnnouncements. Program #1. Reading. Is on the web Additional info on elf file format is on the web. Chapter 6. CMSC 412 S02 (lect 5)
Program #1 Announcements Is on the web Additional info on elf file format is on the web Reading Chapter 6 1 Selecting a process to run called scheduling can simply pick the first item in the queue called
More informationMotivation. Types of Scheduling
Motivation 5.1 Scheduling defines the strategies used to allocate the processor. Successful scheduling tries to meet particular objectives such as fast response time, high throughput and high process efficiency.
More informationIntroduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras
Introduction to Operating Systems Prof. Chester Rebeiro Department of Computer Science and Engineering Indian Institute of Technology, Madras Week 05 Lecture 19 Priority Based Scheduling Algorithms So
More informationCSE 5343/7343 Fall 2006 PROCESS SCHEDULING
CSE 5343/7343 Fall 2006 PROCESS SCHEDULING Professor Margaret H. Dunham Department of Computer Science and Engineering Southern Methodist University Dallas, Texas 75275 (214) 768-3087 fax: (214) 768-3085
More informationIntroduction to Operating Systems. Process Scheduling. John Franco. Dept. of Electrical Engineering and Computing Systems University of Cincinnati
Introduction to Operating Systems Process Scheduling John Franco Dept. of Electrical Engineering and Computing Systems University of Cincinnati Lifespan of a Process What does a CPU scheduler do? Determines
More informationLimited-preemptive Earliest Deadline First Scheduling of Real-time Tasks on Multiprocessors
Limited-preemptive Earliest Deadline First Scheduling of Real-time Tasks on Multiprocessors Mälardalen University School of Innovation, Design and Technology Kaiqian Zhu Master Thesis 5/27/15 Examiner:
More informationUniprocessor Scheduling
Chapter 9 Uniprocessor Scheduling In a multiprogramming system, multiple processes are kept in the main memory. Each process alternates between using the processor, and waiting for an I/O device or another
More informationFIFO SJF STCF RR. Operating Systems. Minati De. Department of Mathematics, Indian Institute of Technology Delhi, India. Lecture 6: Scheduling
Operating Systems Minati De Department of Mathematics, Indian Institute of Technology Delhi, India. Lecture 6: Scheduling What is a scheduling policy? On context switch, which process to run next, from
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 informationPrinciples of Operating Systems
Principles of Operating Systems Lecture 9-10 - CPU Scheduling Ardalan Amiri Sani (ardalan@uci.edu) [lecture slides contains some content adapted from previous slides by Prof. Nalini Venkatasubramanian,
More informationRate Monotonic Analysis
Rate Monotonic Analysis Periodic tasks Extending basic theory Synchronization and priority inversion Aperiodic servers Case study: BSY-1 Trainer 1 Purpose of Tutorial Introduce rate monotonic analysis
More informationChapter 9 Uniprocessor Scheduling
Operating Systems: Internals and Design Principles Chapter 9 Uniprocessor Scheduling Eighth Edition By William Stallings Table 9.1 Types of Scheduling Long- t er m schedul i ng The decision to add to the
More informationIntro to O/S Scheduling. Intro to O/S Scheduling (continued)
Intro to O/S Scheduling 1. Intro to O/S Scheduling 2. What is Scheduling? 3. Computer Systems Scheduling 4. O/S Scheduling Categories 5. O/S Scheduling and Process State 6. O/S Scheduling Layers 7. Scheduling
More informationEEE499 - Real-Time Embedded System Design. Real-Time Schedulability Part I
EEE499 - Real-Time Embedded System Design Real-Time Schedulability Part I Outline Timing Requirements Concurrency and Scheduling Scheduling Schemes Notation Rate Monotonic Algorithm Utilization Bound Theorem
More informationAdvanced Types Of Scheduling
Advanced Types Of Scheduling In the previous article I discussed about some of the basic types of scheduling algorithms. In this article I will discuss about some other advanced scheduling algorithms.
More informationDesign and Implementation of LST Based Dynamic Scheduler on Real Time OS
Design and Implementation of LST Based Dynamic Scheduler on Real Time OS Prasad M Kamath, Rakesh Belagali, Sushant S Kulkarni, Vinayak Hegde, Geetishree Mishra Department of Electronics and Communication,
More informationCPU Scheduling: Part I. Operating Systems. Spring CS5212
Operating Systems Spring 2009-2010 Outline CPU Scheduling: Part I 1 CPU Scheduling: Part I Outline CPU Scheduling: Part I 1 CPU Scheduling: Part I Basic Concepts CPU Scheduling: Part I Maximum CPU utilization
More informationCPU Scheduling. Disclaimer: some slides are adopted from book authors and Dr. Kulkarni s slides with permission
CPU Scheduling Disclaimer: some slides are adopted from book authors and Dr. Kulkarni s slides with permission 1 Recap Deadlock prevention Break any of four deadlock conditions Mutual exclusion, no preemption,
More informationRoadmap. Tevfik Ko!ar. CSC Operating Systems Spring Lecture - V CPU Scheduling - I. Louisiana State University.
CSC 4103 - Operating Systems Spring 2008 Lecture - V CPU Scheduling - I Tevfik Ko!ar Louisiana State University January 29 th, 2008 1 Roadmap CPU Scheduling Basic Concepts Scheduling Criteria Different
More informationSE350: Operating Systems. Lecture 6: Scheduling
SE350: Operating Systems Lecture 6: Scheduling Main Points Definitions Response time, throughput, scheduling policy, Uniprocessor policies FIFO, SJF, Round Robin, Multiprocessor policies Scheduling sequential
More informationReading Reference: Textbook: Chapter 7. UNIX PROCESS SCHEDULING Tanzir Ahmed CSCE 313 Fall 2018
Reading Reference: Textbook: Chapter 7 UNIX PROCESS SCHEDULING Tanzir Ahmed CSCE 313 Fall 2018 Process Scheduling Today we will ask how does a Kernel juggle the (often) competing requirements of Performance,
More informationReference model of real-time systems
Reference model of real-time systems Chapter 3 of Liu Michal Sojka Czech Technical University in Prague, Faculty of Electrical Engineering, Department of Control Engineering November 8, 2017 Some slides
More informationLecture 11: CPU Scheduling
CS 422/522 Design & Implementation of Operating Systems Lecture 11: CPU Scheduling Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions of
More informationCPU Scheduling (Chapters 7-11)
CPU Scheduling (Chapters 7-11) CS 4410 Operating Systems [R. Agarwal, L. Alvisi, A. Bracy, M. George, E. Sirer, R. Van Renesse] The Problem You re the cook at State Street Diner customers continuously
More informationScheduling Processes 11/6/16. Processes (refresher) Scheduling Processes The OS has to decide: Scheduler. Scheduling Policies
Scheduling Processes Don Porter Portions courtesy Emmett Witchel Processes (refresher) Each process has state, that includes its text and data, procedure call stack, etc. This state resides in memory.
More informationScheduling Algorithms. Jay Kothari CS 370: Operating Systems July 9, 2008
Scheduling Algorithms Jay Kothari (jayk@drexel.edu) CS 370: Operating Systems July 9, 2008 CPU Scheduling CPU Scheduling Earlier, we talked about the life-cycle of a thread Active threads work their way
More informationReal-Time Scheduler Design For Embedded System Domain
Real-Time Scheduler Design For Embedded System Domain Anil Kumar Mishra #, Yogomaya Mohapatra*, Ashis Kumar Mishra # # Department of Computer Science & Engineering, Orissa Engineering College Bhubaneswar,
More informationSimulation of Process Scheduling Algorithms
International Journal of Engineering Science Invention ISSN (Online): 2319 6734, ISSN (Print): 2319 6726 Volume 6 Issue 11 November 2017 PP. 67-71 Simulation of Process Scheduling Algorithms Akanksha Verma
More informationCSE 451: Operating Systems Spring Module 8 Scheduling
CSE 451: Operating Systems Spring 2017 Module 8 Scheduling John Zahorjan Scheduling In discussing processes and threads, we talked about context switching an interrupt occurs (device completion, timer
More informationPerformance Comparison of RTS Scheduling Algorithms
ISSN : 2229-4333(Print) ISSN : 0976-8491(Online) Performance Comparison of RTS Scheduling s Amit Sandhu Deptt. of CSE, Arni School of Technology, Arni University, Kathgarh (HP), India IJCST Vo l. 2, Is
More informationRecall: Example of RR with Time Quantum = 20. Round-Robin Discussion
CS162 Operating Systems and Systems Programming Lecture 10 Scheduling February 21 st, 2018 Profs. Anthony D. Joseph and Jonathan Ragan-Kelley http://cs162.eecs.berkeley.edu Recall: Example of RR with Time
More informationThe Design of SMART: A Scheduler for Multimedia Applications
The Design of SMART: A Scheduler for Multimedia Applications Jason Nieh and Monica S. Lam {nieh,lam}@cs.stanford.edu Technical Report CSL-TR-96-697 Computer Systems Laboratory Stanford University June
More informationReal-Time Scheduling Theory and Ada
Technical Report CMU/SEI-88-TR-033 ESD-TR-88-034 Real-Time Scheduling Theory and Ada Lui Sha John B. Goodenough November 1988 Technical Report CMU/SEI-88-TR-033 ESD-TR-88-034 November 1988 Real-Time Scheduling
More informationSalisu Aliyu Department of Mathematics, Ahmadu Bello University, Zaria, Nigeria
Volume 4, Issue 2, February 14 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com An Additional
More informationOperating Systems. Scheduling
Operating Systems Fall 2014 Scheduling Myungjin Lee myungjin.lee@ed.ac.uk 1 Scheduling In discussing processes and threads, we talked about context switching an interrupt occurs (device completion, timer
More informationSCHEDULING AND CONTROLLING PRODUCTION ACTIVITIES
SCHEDULING AND CONTROLLING PRODUCTION ACTIVITIES Al-Naimi Assistant Professor Industrial Engineering Branch Department of Production Engineering and Metallurgy University of Technology Baghdad - Iraq dr.mahmoudalnaimi@uotechnology.edu.iq
More informationMwave/OS: A Predictable Real-time DSP Operating System
Mwave/OS: A Predictable Real-time DSP Operating System Jay K. Strosnider and Daniel I. Katcher Department of Electrical& Computer Engineering Carnegie Mellon University Pittsburgh, PA 15213 strosnider@ece.cmu.edu
More informationIntroduction to Real-Time Systems. Note: Slides are adopted from Lui Sha and Marco Caccamo
Introduction to Real-Time Systems Note: Slides are adopted from Lui Sha and Marco Caccamo 1 Overview Today: this lecture introduces real-time scheduling theory To learn more on real-time scheduling terminology:
More informationCPU Scheduling. Jo, Heeseung
CPU Scheduling Jo, Heeseung CPU Scheduling (1) CPU scheduling Deciding which process to run next, given a set of runnable processes Happens frequently, hence should be fast Scheduling points 2 CPU Scheduling
More informationScheduling theory, part 1
Scheduling theory, part 1 Aperiodic jobs Pontus Ekberg Uppsala University 2017-09-01 Real-time systems? Not necessarily fast but always predictable 2 Real-time systems: theory & practice Practice Building
More informationReal-time System Overheads: a Literature Overview
Real-time System Overheads: a Literature Overview Mike Holenderski October 16, 2008 Abstract In most contemporary systems there are several jobs concurrently competing for shared resources, such as a processor,
More informationScheduling issues in mixedcriticality
Scheduling issues in mixedcriticality systems Sanjoy Baruah The University of North Carolina at Chapel Hill Scheduling issues in mixedcriticality systems Integrated environments: Multiple systems on a
More informationSchedulability Test for Soft Real-Time Systems under Multi- processor Environment by using an Earliest Deadline First Scheduling Algorithm Abstract
Schedulability Test for Soft Real-Time Systems under Multiprocessor Environment by using an Earliest Deadline First Scheduling Algorithm Jagbeer Singh Dept. of Computer Science and Engineering Gandhi Institute
More informationA COMPARATIVE ANALYSIS OF SCHEDULING ALGORITHMS
IMPACT: International Journal of Research in Applied, Natural and Social Sciences (IMPACT: IJRANSS) ISSN(E): 23218851; ISSN(P): 23474580 Vol. 3, Issue 1, Jan 2015, 121132 Impact Journals A COMPARATIVE
More informationCPU Scheduling. Jo, Heeseung
CPU Scheduling Jo, Heeseung Today's Topics General scheduling concepts Scheduling algorithms Case studies 2 CPU Scheduling (1) CPU scheduling Deciding which process to run next, given a set of runnable
More informationCRITICAL TASK RE-ASSIGNMENT UNDER HYBRID SCHEDULING APPROACH IN MULTIPROCESSOR REAL- TIME SYSTEMS
CRITICAL TASK RE-ASSIGNMENT UNDER HYBRID SCHEDULING APPROACH IN MULTIPROCESSOR REAL- TIME SYSTEMS Gopalakrishnan T.R. Nair 1, Christy A. Persya 2 1 Saudi Aramco Endowed Chair - Technology, Prince Mohammad
More informationSeptember 30 th, 2015 Prof. John Kubiatowicz
CS162 Operating Systems and Systems Programming Lecture 10 Scheduling September 30 th, 2015 Prof. John Kubiatowicz http://cs162.eecs.berkeley.edu Acknowledgments: Lecture slides are from the Operating
More informationImplementing a Predictable Real-Time. Multiprocessor Kernel { The Spring Kernel.
Implementing a Predictable Real-Time Multiprocessor Kernel { The Spring Kernel. L. D. Molesky, K. Ramamritham, C. Shen, J. A. Stankovic, and G. Zlokapa Department of Computer and Information Science University
More informationCo-scheduling Real-time Tasks and Non Real-time Tasks Using Empirical Probability Distribution of Execution Time Requirements.
Co-scheduling Real-time Tasks and Non Real-time Tasks Using Empirical Probability Distribution of Execution Time Requirements Abhishek Singh A dissertation submitted to the faculty of the University of
More informationChapter 3: Planning and Scheduling Lesson Plan
Lesson Plan Assumptions and Goals List-Processing Algorithm Optimal Schedules Strange Happenings For All Practical Purposes Mathematical Literacy in Today s World, 8th ed. Critical-Path Schedules Independent
More informationImplementation and Evaluation of Multi-Mode Real-Time Tasks under Different Scheduling Algorithms
Implementation and Evaluation of Multi-Mode Real-Time Tasks under Different Scheduling Algorithms Anas Toma, Vincent Meyers and Jian-Jia Chen TU University, Germany Supported by DFG as part of the Collaborative
More informationAPPENDIX 1 Processing time (pij) Release date (rj) Due date (dj): Weight (wj)
172 APPENDIX 1 In all the scheduling problems considered the number of jobs and the number of machines are assumed to be finite. The number of jobs is denoted by N and the number of machines by M. usually,
More informationBounding Worst-Case Response Time for Tasks With Non-Preemptive Regions
Bounding Worst-Case Response Time for Tasks With Non-Preemptive Regions Harini Ramaprasad, Frank Mueller Dept. of Computer Science, Center for Efficient, Secure and Reliable Computing North Carolina State
More informationCS 153 Design of Operating Systems Winter 2016
CS 153 Design of Operating Systems Winter 2016 Lecture 11: Scheduling Scheduling Overview Scheduler runs when we context switching among processes/threads on the ready queue What should it do? Does it
More informationExploiting Dynamic Workload Variation in Low Energy Preemptive Task Scheduling
Exploiting Dynamic Workload Variation in Low Energy Preemptive Scheduling Xiaobo Sharon Department of Electrical and Electronic Engineering Department of Computer Science and Engineering Hong Kong University
More informationSlack Assessment of the Real Time Scheduling Algorithms
International Journal of Control Theory and Applications ISSN : 0974-5572 International Science Press Volume 9 Number 43 2016 Slack Assessment of the Real Time Scheduling Algorithms P. Ramesh a and Uppu
More information1
VE7104/INTRODUCTION TO EMBEDDED CONTROLLERS MULTITASKING AND THE REAL-TIME OPERATING SYSTEM The challenges of multitasking and real-time, Achieving multitasking with sequential programming, RTOS, Scheduling
More informationTimed/Advance Reservation Schemes and Scheduling Algorithms for QoS Resource Management in Grids
CHAPTER 16 Timed/Advance Reservation Schemes and Scheduling Algorithms for QoS Resource Management in Grids Emmanuel Varvarigos University of Patras, Department of Computer Engineering and Informatics,
More informationPeriodic task scheduling
Periodic task scheduling Optimality of rate monotonic scheduling (among static priority policies) Utilization bound for EDF Optimality of EDF (among dynamic priority policies) Tick-driven scheduling (OS
More informationLecture 3. Questions? Friday, January 14 CS 470 Operating Systems - Lecture 3 1
Lecture 3 Questions? Friday, January 14 CS 470 Operating Systems - Lecture 3 1 Outline CPU scheduling Comparison criteria Scheduling algorithms First Come, First Serviced (FCFS) Shortest Job First (SJF)
More informationDual Priority Algorithm to Schedule Real-Time Tasks in a Shared Memory Multiprocessor
Dual Priority Algorithm to Schedule Real-Time Tasks in a Shared Memory Multiprocessor Josep M. Banús, Alex Arenas and Jesús Labarta Departament d'enginyeria Informàtica i Matemàtiques, Universitat Rovira
More informationAdaptive Total Bandwidth Server: Using Predictive Execution Time
Adaptive Total Bandwidth Server: Using Predictive Execution Time Kiyofumi Tanaka School of Information Science, Japan Advanced Institute of Science and Technology, Asahidai 1 1, Nomi-city, Ishikawa, 923
More information