COMPLEX EMBEDDED SYSTEMS

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "COMPLEX EMBEDDED SYSTEMS"

Transcription

1 COMPLEX EMBEDDED SYSTEMS Real-Time Scheduling Summer Semester 2012 System and Software Engineering Prof. Dr.-Ing. Armin Zimmermann

2 Contents Introduction Scheduling in Interactive Systems Real-Time Scheduling Priorities Earliest Deadline First Least Laxity First Periodic Processes Real-Time Scheduling 2

3 Introduction Concurrent Processes need Resources Processor, memory, device, file, Interdependencies of otherwise independent processes Resources must be managed by the operating system If a process cannot reserve all required resource, it has to wait (process state: blocked) Scheduler decides which process runs preemption creation ready queue ready dispatch blocked running processor terminated resource allocation semaphore queues resource requirement Real-Time Scheduling 3

4 Introduction Goals of Scheduling Optimal performance of the system, throughput How? ordering of ready processes Scheduling algorithms try to achieve the best possible results (on average or for a given process set) Optimality Criteria Turnaround time, waiting time, response time of processes Processor utilization Throughput (finished processes per time unit) Meet deadlines: feasibility, schedulability Real-Time Scheduling 4

5 Introduction Classification of Scheduling Algorithms I Static All parameters are known a-priori Scheduling can thus be finished at design time, thus highly efficient during run time Applicable for closed embedded systems Dynamic Not all parameters are known before on-line scheduling necessary Optimality goal can often be achieved only approximately Scheduling requires computational effort Normal OS operation for interactive systems Real-Time Scheduling 5

6 Introduction Classification of Scheduling Algorithms II Non-preemptive scheduling The operating system does not take away the processor from the running process, it runs until it ends or gives away the processor Advantage: simple implementation of process change Disadvantage: not useful for real-time systems, where rapid reactions to external events are necessary Preemptive scheduling The operating system interrupts the running process whenever there is a need to reschedule Real-Time Scheduling 6

7 Introduction Computational Effort of Scheduling Analysis of stochastic and deterministic models of resources and processes are computationally expensive Example n processes with individual interdependencies, run times, and ready times Goal: a sequence of process executions that minimizes mean waiting time Algorithm: in the worst case, all n! possible sequences have to be constructed and analyzed Exponential complexity, not useful for non-trivial task sets General Problem of Scheduling is NP hard Thus only simplified models are used (independency) Real-Time Scheduling 7

8 Introduction Simplification of Analysis Independent processes (i.e., no successor/predecessor relationships) Only the CPU needs to be taken into account ( processor-bound system ) preemption creation ready queue ready dispatch running processor terminated (There are transformation rules that can account for dependencies by adjusting ready times and deadlines) Real-Time Scheduling 8

9 Introduction Schedulability and Optimal Algorithms Schedulability is only interesting for real-time systems timely if all deadlines are met; hard real-time system model A timely schedule for a non-real-time task set can always be found, because there are no deadlines Static scheduling algorithms are called optimal when they find a timely plan (if there is one) Dynamic scheduling algorithms are called optimal when thy find a timely plan, if a static algorithm would have been able to find one Real-Time Scheduling 9

10 Introduction Scheduling in Interactive Systems Real-Time Scheduling Priorities Earliest Deadline First Least Laxity First Periodic Processes Real-Time Scheduling 10

11 First Come First Served Scheduling Based on Arrival Time Simplest algorithm: schedule the processes in the order in which they arrive in the ready queue (non-preemptive) First-Come-First-Served (FCFS) or FIFO algorithm Assumed to be fair among humans What about computer processes? Mean waiting time: FCFS is not optimal! How to show this? Example Performance of analyzed scheduling algorithm is worse than another hand-picked schedule Example on following slide Real-Time Scheduling 11

12 First Come First Served Three processes, P2, P3 with computation times C1 = 2, C2 = 3 and C3 = 1 arrive in the sequence P2,, P3 P2 P time Real-Time Scheduling 12

13 First Come First Served FCFS computes the following schedule (Gantt chart): P2 P time Process waiting times W2 = 0, W1 = 3 and W3 = 5 Mean waiting time is thus ( ) / 3 = 8/3 Reason: sometimes, short processes have to wait for longer ones Conclusion: take run time into account Real-Time Scheduling 13

14 Shortest Job First Scheduling Based on Computation Time Sort processes in the ready queue depending on their run time, shortest first Shortest Job First Algorithm (SJF) SJF is optimal for mean waiting time Real-Time Scheduling 14

15 Shortest Job First Using the previous example with ready times = 0 P2 P time SJF results in the following schedule P3 P time Mean waiting time is reduced to 4/3 (half!) Real-Time Scheduling 15

16 Shortest Job First Proof of Optimality of SJF for Mean Waiting Time Move a shorter process a in front of a longer one c - increases waiting time of c - reduces waiting time for a x c b a time x a b c time Above: W(c) = x, W(a) = x + c + b Below: W(c) = x + a + b, W(a) = x c > a, thus mean waiting time is reduced Real-Time Scheduling 16

17 Shortest Job First Shortest Job First with Preemption Is the computation time of a new process smaller than the remaining time of the running, the latter is preempted and the new process becomes running The previously running process is put into the ready queue depending on its remaining run time Example: P2 P3 P time Real-Time Scheduling 17

18 Shortest Job First Mean waiting time with preemption: ( )/4 = 1.5 Non-preemptive: ( )/4 = P3 P4 P preemptive time P3 P4 P Nonpreemptive time Real-Time Scheduling 18

19 Round Robin Rotation Principle Each process runs for a short time interval (time slice) At the end of the time, the process in interrupted and put at the end of the ready queue (preemptive scheduling) If a process terminates (or blocks) during its time, another one is run Newly created processes are put at the end of the ready queue Real-Time Scheduling 19

20 Round Robin Example: Ready queue contents at time 0: processes in the sequence, P2, P3; time slice = 1 P2 P3 P time ready queue 4 2 P2 P3 P4 P2 P2 Zeit Mean waiting time: ( )/4 = 10.5/4 = Real-Time Scheduling 20

21 Non-RT Scheduling Algorithms Overview First-in-first-out (FIFO, FCFS) Non-preemptive (cooperative multi tasking) DOS, Windows before NT Shortest job first (SJF) Selection of the process with the smallest computation time Minimizes mean waiting time: early mainframe computers Preemptive or non-preemptive Round robin Preemptive, time slice Not useful for (embedded) real-time systems! Real-Time Scheduling 21

22 Introduction Scheduling in Interactive Systems Real-Time Scheduling Priorities Earliest Deadline First Least Laxity First Periodic Processes Real-Time Scheduling 22

23 Real-Time Scheduling Real-Time Scheduling requires Assignment of processor to the most important task Priorities What about conflicts between equally prioritized processes? E.g. round robin Interruptability of less important tasks Preemptive, interrupts may lead to rescheduling When should be checked? Interrupt (automatically) Discrete scheduling points clock tick, software timer Task creation and termination Impossible if preemption is disabled! Real-Time Scheduling 23

24 Priorities Priority Urgency of computation Dispatching of processor to task with highest priority May be assigned statically or dynamically RTOS: user-specified process priorities Priorities may be assigned or adapted by OS Process priority change is an important OS operation Scheduling in a narrower sense: assignment of priorities Real-Time Scheduling 24

25 Priorities Example: Priority structure of Windows NT 7 thread priorities in a process 16 process priorities Real-Time Scheduling 25

26 Introduction Scheduling in Interactive Systems Real-Time Scheduling Priorities Earliest Deadline First Least Laxity First Periodic Processes Real-Time Scheduling 26

27 Real-Time Scheduling Parameters of Processes jitter trigger event latency remaining response time remaining c. time laxity, slack ready time computation time process starting time completion time deadline t now Real-Time Scheduling 27

28 Real-Time Scheduling Terms and Parameters Ready Time R Computation Time C Deadline D Process can often be started after their ready time, thus: starting time ts and completion time tc Derived values Remaining response time a(t) = D t Remaining computation time CR(t) Laxity (or slack time) L(t) = a(t) CR(t) Real-Time Scheduling 28

29 Earliest Deadline First Deadline-Based Scheduling Use only deadlines of processes for scheduling, not computation times The processor is assigned to the task with the closest deadline (earliest deadline first, EDF) Most well-known algorithm for independent processes Non-preemptive: reschedule when the currently running task terminates Preemptive: reschedule when a new process becomes ready Real-Time Scheduling 29

30 Earliest Deadline First Static EDF with Equal Ready Times Sort processes with ascending deadlines [Jackson 55] Whenever a process is scheduled, check if its deadline is met or violated For the k-th process it must hold that k å i= 1 C D k = 1 n i k Real-Time Scheduling 30

31 Earliest Deadline First Example P2 P3 deadline time P3 P time EDF is optimal for identical ready times! Real-Time Scheduling 31

32 Earliest Deadline First Proof (indirect) The processor is always utilized because If the schedule has been timely before adding P k, it is not any more afterwards: k C > D i= 1 The only possibility is then to exchange P k with one of the already planned processes P j (j < k) The sum of execution times remains unchanged We know that D D and thus j å Therefore the exchange makes things worse k k å i= 1 i C i R = 0 Thus: If this algorithm does not find a solution, there is none > k D j i Real-Time Scheduling 32

33 Earliest Deadline First Static EDF for Individual Ready Times Non-preemptive scheduling is not optimal: (counter example) P2 P t P3 P t Real-Time Scheduling 33

34 Earliest Deadline First There are timely schedules for the example, e.g. P2 P t It can be shown that preemptive EDF is optimal for this case [Horn 74] For the example: P3 P2 P t Real-Time Scheduling 34

35 Earliest Deadline First What About Multi Processor Systems? An example shows that EDF is not optimal even for the simple case of equal ready times P2 Pr1 P3 P t P t Pr t Real-Time Scheduling 35

36 Earliest Deadline First There is a timely schedule: Pr1 P t Pr2 P t Obvious cause of the problem: the remaining time is not taken into account! Real-Time Scheduling 36

37 Introduction Scheduling in Interactive Systems Real-Time Scheduling Priorities Earliest Deadline First Least Laxity First Periodic Processes Real-Time Scheduling 37

38 Least Laxity First Scheduling Based on Slack / Laxity The processor is assigned to the process with the shortest remaining delay time (least laxity first, LLF, least slack time) Laxity: time between earliest completion time and deadline, thus EDF plus remaining computation time Scheduling for Single-Processor Systems Preemptive LLF and preemptive EDF are equivalent Real-Time Scheduling 38

39 Least Laxity First Example: equal ready times, static schedule laxity P2 P time P2 P time Real-Time Scheduling 39

40 Least Laxity First Example: different ready times, preemptive schedule P2 P t P2 P2 P3 P t Real-Time Scheduling 40

41 Least Laxity First Under preemptive LLF, only discrete scheduling points must be considered ( t = 1 in the example) Otherwise, infinitely many process changes may happen (in reality, all computation time is wasted for process changes) Laxity L of processes over time for the example: L() L(P3) L(P2) P2 P2 P3 P t Real-Time Scheduling 41

42 Introduction Scheduling in Interactive Systems Real-Time Scheduling Priorities Earliest Deadline First Least Laxity First Periodic Processes Real-Time Scheduling 42

43 Periodic Processes Timing Behavior of Recurring Processes Periodic Starts exactly every x time units Or: starts once inside each time interval of length x Sporadic Not periodic An upper bound on the number of events per time unit is known Aperiodic None of the above (worst case) No guarantees possible Real-Time Scheduling 43

44 Periodic Processes Independent Periodic Processes Important for embedded real-time applications (remember basic software architectures) Numerous scheduling algorithms have been considered Usual assumptions Every task has a period T The deadline of each task equals the end of the period The ready time of each task equals the start of the period Real-Time Scheduling 44

45 Periodic Processes T1 P2 P2 P2 P2 T2 T3 P3 P t Periodic start of tasks preemption must be possible High practical importance, because fixed priorities can be assigned to processes, and thus common real-time operating systems can be used Real-Time Scheduling 45

46 Periodic Processes Arrival-Rate Based Scheduling The higher the arrival rate of a process, the higher is its assigned static priority (rate monotonic, RM, [Liu und Leyland 73]) Arrival rate = reciprocal of period Arbitrary different priorities are assigned in the case of equal arrival rates Real-Time Scheduling 46

47 Periodic Processes T1 P2 P3 T2 P2 P2 P P2 T1 P3 T2 P3 P3 T3 P3 P2 P2 P2 P periods: 3, 5, 15 common period = least common multiple : 15 T3 P3 t t U U U P2 P3 1 = 3 2 = 5 3 = US = 15 Real-Time Scheduling 47

48 Periodic Processes Analysis of the Algorithm Critical instant: maximum response time of a task Occurs when all higher prioritized tasks are also runnable Assume two processes, P2 with periods i and comp. t.s T i During P2, is executed at most é t t ù times We thus require Overall utilization is thus ê é t t ù T + T t ê ú n T U = i å ti i= 1 Optimal static scheduling algorithm for one processor if utilization U for n tasks not greater than ú n n( 2-1) Thus for large n the maximum is lim U = ln 2» 0.69 n Real-Time Scheduling 48

49 Periodic Processes Rate-monotonic scheduling is not optimal in general Counter example T1 T2 P2 P2 P t Rate monotonic schedule P2 P2 P2 P2 P2 P t Real-Time Scheduling 49

50 Periodic Processes However, EDF computes a timely schedule P2 P2 P t It can be shown that there is no scheduling algorithm for periodic processes using static priorities that has a better performance! Real-Time Scheduling 50

51 Periodic Processes Further Properties Processes that start less frequently are preempted more often and thus delayed more The process with the highest priority is never delayed In the case of an overload situation (exceeding the assumptions of the analysis), only some lower-priority processes miss their deadlines Real-Time Scheduling 51

52 Periodic Processes What About Aperiodic Processes? Possibility: one dedicated periodic dummy process executes aperiodic requests [Lehoczky et al. 87] This process is characterized by its period and assigned run time (run time / period = assigned max. utilization) A certain part of the processor is thus reserved for aperiodic requests Utilization for this part can be exactly determined by assigning the highest priority Stochastic processes: performance evaluation model analysis to derive parameters of dummy process Real-Time Scheduling 52

Chapter 6: CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms

Chapter 6: CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Operating System Concepts 6.1 Basic Concepts Maximum CPU utilization obtained with multiprogramming. CPU I/O Burst Cycle

More information

CPU Scheduling. CS439: Principles of Computer Systems September 7, 2016

CPU Scheduling. CS439: Principles of Computer Systems September 7, 2016 CPU Scheduling CS439: Principles of Computer Systems September 7, 2016 Last Time A process is a unit of execution Defines an address space An abstraction for protection Processes are represented as Process

More information

CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling

CPU Scheduling. Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Basic Concepts An OS must allocate resources amongst competing processes The resource

More information

COS 318: Operating Systems. CPU Scheduling. (http://www.cs.princeton.edu/courses/cos318/)

COS 318: Operating Systems. CPU Scheduling. (http://www.cs.princeton.edu/courses/cos318/) COS 318: Operating Systems CPU Scheduling (http://www.cs.princeton.edu/courses/cos318/) Today s Topics! CPU scheduling! CPU Scheduling algorithms 2 When to Schedule?! Process/thread creation! Process/thread

More information

W4118 Operating Systems. Instructor: Junfeng Yang

W4118 Operating Systems. Instructor: Junfeng Yang W4118 Operating Systems Instructor: Junfeng Yang Outline Introduction to scheduling Scheduling algorithms 1 Direction within course Until now: interrupts, processes, threads, synchronization Mostly mechanisms

More information

Process and Thread Scheduling. Raju Pandey Department of Computer Sciences University of California, Davis Winter 2005

Process and Thread Scheduling. Raju Pandey Department of Computer Sciences University of California, Davis Winter 2005 Process and Thread Scheduling Raju Pandey Department of Computer Sciences University of California, Davis Winter 2005 Scheduling Context switching an interrupt occurs (device completion, timer interrupt)

More information

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Alternating Sequence of CPU And I/O Bursts

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Alternating Sequence of CPU And I/O Bursts Objectives Chapter 5: CPU Scheduling Introduce CPU scheduling, which is the basis for multiprogrammed operating systems Describe various CPU-scheduling algorithms Discuss evaluation criteria for selecting

More information

Processor Scheduling. Background. Scheduling. Scheduling

Processor Scheduling. Background. Scheduling. Scheduling Background Processor Scheduling The previous lecture introduced the basics of concurrency Processes and threads Definition, representation, management We now understand how a programmer can spawn concurrent

More information

CPU Scheduling. Chapter 5

CPU Scheduling. Chapter 5 CPU Scheduling Chapter 5 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait CPU burst distribution

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Chapter 6: 6.1 Basic Concepts Maximum CPU utilization obtained with multiprogramming.

More information

Chapter 5: Process Scheduling. Chapter 5: Process Scheduling

Chapter 5: Process Scheduling. Chapter 5: Process Scheduling Chapter 5: Process Scheduling Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Operating Systems Examples Java Thread Scheduling Algorithm

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Oct-03 1 Basic Concepts Maximum CPU utilization

More information

CS720 - Operating Systems. CPU Scheduling

CS720 - Operating Systems. CPU Scheduling CS720 - Operating Systems CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Procesor Scheduling Real-Time Scheduling Algorithm Evaluation Slides derived from material in

More information

COS 318: Operating Systems. CPU Scheduling. Kai Li and Andy Bavier Computer Science Department Princeton University

COS 318: Operating Systems. CPU Scheduling. Kai Li and Andy Bavier Computer Science Department Princeton University COS 318: Operating Systems CPU Scheduling Kai Li and Andy Bavier Computer Science Department Princeton University http://www.cs.princeton.edu/courses/archive/fall13/cos318/ Quiz 1 u Avg score: 10.7 u Suggested

More information

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts

Objectives. Chapter 5: CPU Scheduling. CPU Scheduler. Non-preemptive and preemptive. Dispatcher. Alternating Sequence of CPU And I/O Bursts Objectives Chapter 5: CPU Scheduling Introduce CPU scheduling, which is the basis for multiprogrammed operating systems Describe various CPU-scheduling algorithms Discuss evaluation criteria for selecting

More information

Objectives. Concepts (2) Scheduler and interrupts. Concepts (1) Bursts

Objectives. Concepts (2) Scheduler and interrupts. Concepts (1) Bursts Objectives Operating Systems Part of E1.9 - Principles of Computers and Software Engineering Lecture 4: Process scheduling To introduce process scheduling algorithms Non-priority based Priority based Examine

More information

CS416 CPU Scheduling

CS416 CPU Scheduling CS416 CPU Scheduling CS 416: Operating Systems Design, Spring 2011 Department of Computer Science Rutgers University Rutgers Sakai: 01:198:416 Sp11 (https://sakai.rutgers.edu) Assumptions Pool of jobs

More information

Chapter 6 CPU Scheduling. Contents

Chapter 6 CPU Scheduling. Contents Contents 1. Introduction 2. Computer-System Structures 3. Operating-System Structures 4. Processes 5. Threads 6. CPU Scheduling 7. Process Synchronization 8. Deadlocks 9. Memory Management 10. Virtual

More information

CHAPTER 5 Exercises 5.1 Answer: 5.2 Answer: 5.3 lottery scheduling

CHAPTER 5 Exercises 5.1 Answer: 5.2 Answer: 5.3 lottery scheduling CHAPTER 5 CPU scheduling is the basis of multiprogrammed operating systems. By switching the CPU among processes, the operating system can make the computer more productive. In this chapter, we introduce

More information

Process Scheduling. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University.

Process Scheduling. Minsoo Ryu. Real-Time Computing and Communications Lab. Hanyang University. Process Scheduling Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Basic Concepts Scheduling Criteria Scheduling Algorithms Windows NT Scheduler Topics Covered

More information

CPU Scheduling. Multiprogrammed OS

CPU Scheduling. Multiprogrammed OS CPU Scheduling Multiprogrammed OS Efficient Use of Processor By switching between jobs Thread scheduling and process scheduling often used interchangeably Which is done depends on implementation of O/S.

More information

Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation

Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 1 Basic Concepts Maximum CPU utilization obtained

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling 1 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation 6.1 2 Basic Concepts Maximum CPU utilization

More information

CPU Scheduling CS 571. CPU - I/O Burst Cycle. Bursts of CPU usage alternate with periods of I/O wait a CPU-bound process an I/O bound process

CPU Scheduling CS 571. CPU - I/O Burst Cycle. Bursts of CPU usage alternate with periods of I/O wait a CPU-bound process an I/O bound process CPU Scheduling CS 571 1 CPU - I/O Burst Cycle Bursts of CPU usage alternate with periods of I/O wait a CPU-bound process an I/O bound process 2 1 Basic Concepts CPU I/O Burst Cycle Process execution consists

More information

CPU Scheduling. Outline

CPU Scheduling. Outline CPU Scheduling Thomas Plagemann (with slides from Otto J. Anshus, Kai Li, Pål Halvorsen and Andrew S. Tanenbaum) Goals of scheduling Outline Scheduling algorithms: FCFS/FIFO, RR, STCF/SRTCF Priority (CTSS,

More information

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition, Chapter 5: CPU Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Linux Example

More information

Operating Systems Fall 2012 Lecture 4: CPU Scheduling

Operating Systems Fall 2012 Lecture 4: CPU Scheduling 482000000000357 Operating Systems Fall 2012 Lecture 4: CPU Scheduling Assist. Prof. Ediz ŞAYKOL ediz.saykol@beykent.edu.tr Operating System - Main Goals Interleave the execution of the number of processes

More information

CPU scheduling. CPU Scheduling. No.4. CPU burst vs. I/O burst. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University

CPU scheduling. CPU Scheduling. No.4. CPU burst vs. I/O burst. Prof. Hui Jiang Dept of Electrical Engineering and Computer Science, York University 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 information

The Nature of Program Executions

The Nature of Program Executions Processor Scheduling 1 The Nature of Program Executions A running thread can be modeled as alternating series of CPU bursts and I/O bursts during a CPU burst, a thread is executing instructions during

More information

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run

Deciding which process to run. (Deciding which thread to run) Deciding how long the chosen process can run SFWR ENG 3BB4 Software Design 3 Concurrent System Design 2 SFWR ENG 3BB4 Software Design 3 Concurrent System Design 11.8 10 CPU Scheduling Chapter 11 CPU Scheduling Policies Deciding which process to run

More information

Chapter 6: CPU Scheduling

Chapter 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 information

Chapter 5: CPU Scheduling!

Chapter 5: CPU Scheduling! Chapter 5: CPU Scheduling Operating System Concepts 8 th Edition, Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling

More information

Lecture 5 CPU Scheduling

Lecture 5 CPU Scheduling Lecture 5 CPU Scheduling (Uniprocessor System) 1 Lecture Contents 1. Basic Concepts 2. Scheduling Criteria 3. Scheduling Algorithms 2 Switching CPU among processes in multiprogrammed OSs makes a computer

More information

Chapter 6: CPU Scheduling. Basic Concepts

Chapter 6: CPU Scheduling. Basic Concepts 1 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 information

Basic Concepts. Chapter 6: CPU Scheduling. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. Alternating Sequence of CPU And I/O Bursts

Basic Concepts. Chapter 6: CPU Scheduling. Histogram of CPU-burst Times. Dispatcher. CPU Scheduler. 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 information

CPU Scheduling: Basic Concepts

CPU Scheduling: Basic Concepts CPU Scheduling: Basic Concepts Idea: Maximum CPU utilization obtained with multiprogramming" CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait" Dispatcher grants CPU

More information

The Nature of Program Executions

The Nature of Program Executions Processor Scheduling 1 The Nature of Program Executions A running thread can be modeled as alternating series of CPU bursts and I/O bursts during a CPU burst, a thread is executing instructions during

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Edited by Ghada Ahmed, PhD ghada@fcih.net Silberschatz, Galvin and Gagne 2013 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process

More information

OPERATING SYSTEMS SCHEDULING

OPERATING SYSTEMS SCHEDULING OPERATING SYSTEMS SCHEDULING Jerry Breecher 5: CPU- 1 CPU What Is In This Chapter? This chapter is about how to get a process attached to a processor. It centers around efficient algorithms that perform

More information

Chapter 6: CPU Scheduling. Previous Lectures. Basic Concepts. Alternating Sequence of CPU And I/O Bursts

Chapter 6: CPU Scheduling. Previous Lectures. Basic Concepts. Alternating Sequence of CPU And I/O Bursts Previous Lectures Multithreading Memory Layout Kernel vs User threads Representation in OS Difference between thread and process Thread scheduling Mapping between user and kernel threads Multithreading

More information

Chapter 5: CPU Scheduling. Operating System Concepts 7 th Edition, Jan 14, 2005

Chapter 5: CPU Scheduling. Operating System Concepts 7 th Edition, Jan 14, 2005 Chapter 5: CPU Scheduling Operating System Concepts 7 th Edition, Jan 14, 2005 Silberschatz, Galvin and Gagne 2005 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling

More information

Chapter 6: CPU Scheduling. Operating System Concepts Essentials 2 nd Edition

Chapter 6: CPU Scheduling. Operating System Concepts Essentials 2 nd Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

CPU Scheduling. Overview: CPU Scheduling. [SGG7/8/9] Chapter 5. Basic Concepts. CPU Scheduler. Scheduling Criteria. Optimization Criteria

CPU Scheduling. Overview: CPU Scheduling. [SGG7/8/9] Chapter 5. Basic Concepts. CPU Scheduler. Scheduling Criteria. Optimization Criteria TDDB68 Concurrent programming and operating systems CPU Scheduling Overview: CPU Scheduling CPU bursts and I/O bursts Scheduling Criteria Scheduling Algorithms Priority Inversion Problem Multiprocessor

More information

CPU Scheduling. Date. 2/2/2004 Operating Systems 1

CPU Scheduling. Date. 2/2/2004 Operating Systems 1 CPU Scheduling Date 2/2/2004 Operating Systems 1 Basic concepts Maximize CPU utilization with multi programming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait.

More information

Scheduling I. Introduction to scheduling. Scheduling algorithms

Scheduling I. Introduction to scheduling. Scheduling algorithms Scheduling I Introduction to scheduling Scheduling algorithms 1 Role of Dispatcher vs. Scheduler Dispatcher Low-level mechanism Responsibility: context switch Scheduler High-level policy Responsibility:

More information

ICS 143 - Principles of Operating Systems

ICS 143 - Principles of Operating Systems ICS 143 - Principles of Operating Systems Lecture 5 - CPU Scheduling Prof. Nalini Venkatasubramanian nalini@ics.uci.edu Note that some slides are adapted from course text slides 2008 Silberschatz. Some

More information

Chapter 5: Process Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: Process Scheduling. Operating System Concepts 8 th Edition, Chapter 5: Process Scheduling, Silberschatz, Galvin and Gagne 2009 Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling

More information

multiple processes are kept in memory simultaneously when one process is waiting, another process executes

multiple processes are kept in memory simultaneously when one process is waiting, another process executes Terminology. Reference: Section 4.2, 5.1 Time-sharing / multiprogramming Typical proc. alternates between CPU bursts and I/O bursts To maximize CPU utilization: multiple processes are kept in memory simultaneously

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

More information

Threads (Ch.4) ! Many software packages are multi-threaded. ! A thread is sometimes called a lightweight process

Threads (Ch.4) ! Many software packages are multi-threaded. ! A thread is sometimes called a lightweight process Threads (Ch.4)! Many software packages are multi-threaded l Web browser: one thread display images, another thread retrieves data from the network l Word processor: threads for displaying graphics, reading

More information

CS 571 Operating Systems. CPU Scheduling. Angelos Stavrou, George Mason University

CS 571 Operating Systems. CPU Scheduling. Angelos Stavrou, George Mason University CS 571 Operating Systems CPU Scheduling Angelos Stavrou, George Mason University CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms First-Come-First-Served Shortest-Job-First, Shortest-remaining-Time-First

More information

CPU Scheduling. CPU Scheduling

CPU Scheduling. CPU Scheduling CPU Scheduling Electrical and Computer Engineering Stephen Kim (dskim@iupui.edu) ECE/IUPUI RTOS & APPS 1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling

More information

Lecture 3 Theoretical Foundations of RTOS

Lecture 3 Theoretical Foundations of RTOS CENG 383 Real-Time Systems Lecture 3 Theoretical Foundations of RTOS Asst. Prof. Tolga Ayav, Ph.D. Department of Computer Engineering Task States Executing Ready Suspended (or blocked) Dormant (or sleeping)

More information

Chapter 5: Process Scheduling

Chapter 5: Process Scheduling Chapter 5: Process Scheduling Chapter 5: Process Scheduling 5.1 Basic Concepts 5.2 Scheduling Criteria 5.3 Scheduling Algorithms 5.3.1 First-Come, First-Served Scheduling 5.3.2 Shortest-Job-First Scheduling

More information

CPU Scheduling. Basic Concepts. Basic Concepts. CPU Scheduler. Histogram of CPU-burst Times CPU. Alternating Sequence of CPU and I/O Bursts

CPU Scheduling. Basic Concepts. Basic Concepts. CPU Scheduler. Histogram of CPU-burst Times CPU. Alternating Sequence of CPU and I/O Bursts Basic Concepts P CPU Scheduling CSCI 315 Operating Systems Design Department of Computer Science Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating

More information

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses

Lecture Outline Overview of real-time scheduling algorithms Outline relative strengths, weaknesses Overview of Real-Time Scheduling Embedded Real-Time Software Lecture 3 Lecture Outline Overview of real-time scheduling algorithms Clock-driven Weighted round-robin Priority-driven Dynamic vs. static Deadline

More information

Scheduling Criteria. response time/turnaround time: time required to finish a task

Scheduling Criteria. response time/turnaround time: time required to finish a task Processor Scheduling 1 Scheduling Criteria CPU utilization: keep the CPU as busy as possible throughput: rate at which tasks are completed response time/turnaround time: time required to finish a task

More information

CPU Scheduling Yi Shi Fall 2015 Xi an Jiaotong University

CPU Scheduling Yi Shi Fall 2015 Xi an Jiaotong University CPU Scheduling Yi Shi Fall 2015 Xi an Jiaotong University Goals for Today CPU Schedulers Scheduling Algorithms Algorithm Evaluation Metrics Algorithm details Thread Scheduling Multiple-Processor Scheduling

More information

Slides from Silberschatz, Galvin and Gagne 2003 Thu D. Nguyen Michael Hicks

Slides from Silberschatz, Galvin and Gagne 2003 Thu D. Nguyen Michael Hicks Slides from Silberschatz, Galvin and Gagne 2003 Thu D. Nguyen Michael Hicks Basic Concepts CPU-I/O burst cycle - Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution

More information

Silberschatz and Galvin

Silberschatz and Galvin Silberschatz and Galvin Chapter 5 CPU Scheduling CPSC 410--Richard Furuta 01/19/99 1 Topics covered Basic concepts/scheduling criteria Non-preemptive and Preemptive scheduling Scheduling algorithms Algorithm

More information

4003-440/4003-713 Operating Systems I. Process Scheduling. Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu)

4003-440/4003-713 Operating Systems I. Process Scheduling. Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu) 4003-440/4003-713 Operating Systems I Process Scheduling Warren R. Carithers (wrc@cs.rit.edu) Rob Duncan (rwd@cs.rit.edu) Review: Scheduling Policy Ideally, a scheduling policy should: Be: fair, predictable

More information

Chapter 6 CPU Scheduling. Processor Scheduling

Chapter 6 CPU Scheduling. Processor Scheduling Chapter 6 CPU Scheduling Processor Scheduling Known as the dispatcher Invoked when an event occurs Clock interrupts I/O interrupts Operating system calls Signals 1 Aim of Scheduling Assign processes to

More information

Describe various CPU-scheduling algorithms. Describe various multi- processor CPU-scheduling algorithms

Describe various CPU-scheduling algorithms. Describe various multi- processor CPU-scheduling algorithms CPU Scheduling Objectives Describe various CPU-scheduling algorithms Describe various multi- processor CPU-scheduling algorithms To discuss evaluation criteria for selecting a CPUscheduling algorithm for

More information

Introduction to CPU Scheduling

Introduction to CPU Scheduling Introduction to CPU Scheduling Minsoo Ryu Department of Computer Science and Engineering 2 1 Process Scheduling Page X 2 Priority-Based Scheduling Page X 3 Proportional Share Scheduling Page X 4 Q & A

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

More information

Types of jobs. CPU-bound vs. I/O-bound. Batch, Interactive, real time. Maximum CPU utilization obtained with multiprogramming

Types of jobs. CPU-bound vs. I/O-bound. Batch, Interactive, real time. Maximum CPU utilization obtained with multiprogramming CPU Scheduling Types of jobs CPU-bound vs. I/O-bound Maximum CPU utilization obtained with multiprogramming Batch, Interactive, real time Different goals, affects scheduling policies CPU Scheduler Selects

More information

Scheduling Criteria. A task might be a single CPU burst, a thread, or an applicationlevel service request. The Nature of Program Executions

Scheduling Criteria. A task might be a single CPU burst, a thread, or an applicationlevel service request. The Nature of Program Executions Processor Scheduling 1 Scheduling Criteria CPU utilization: keep the CPU as busy as possible throughput: rate at which tasks are completed response time/turnaround time: time required to finish a task

More information

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition,

Chapter 5: CPU Scheduling. Operating System Concepts 8 th Edition, Chapter 5: CPU Scheduling, Silberschatz, Galvin and Gagne 2009 Objectives To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various scheduling algorithms

More information

Module 5: CPU Scheduling

Module 5: CPU Scheduling Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Operating System Concepts 5.1 Silberschatz and

More information

Module 6: CPU Scheduling. Basic Concepts

Module 6: CPU Scheduling. Basic Concepts Module 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Applied Operating System Concepts 6.1 Silberschatz,

More information

KSU/CCIS CSC227 Tutorial # 4 CPU Scheduling SUMMER

KSU/CCIS CSC227 Tutorial # 4 CPU Scheduling SUMMER KSU/CCIS CSC227 Tutorial # 4 CPU Scheduling SUMMER - 2010 Question # 1: Select the most appropriate answer for each of the following questions: 1. is the number of processes that complete their execution

More information

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Thread Scheduling Operating Systems Examples

More information

COSC243 Part 2: Operating Systems

COSC243 Part 2: Operating Systems COSC243 Part 2: Operating Systems Lecture 17: CPU Scheduling Zhiyi Huang Dept. of Computer Science, University of Otago Zhiyi Huang (Otago) COSC243 Lecture 17 1 / 30 Overview Last lecture: Cooperating

More information

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition

Chapter 6: CPU Scheduling. Operating System Concepts 9 th Edition Chapter 6: CPU Scheduling Silberschatz, Galvin and Gagne 2013 Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Real-Time

More information

Lecture 6- CPU Scheduling Continued

Lecture 6- CPU Scheduling Continued Lecture 6- CPU Scheduling Continued Instructor : Bibhas Ghoshal (bibhas.ghoshal@iiita.ac.in) Autumn Semester, 2015 Bibhas Ghoshal IOSY 332C & IOPS 332C: OS Autumn Semester, 2015 1 / 24 Shortest Remaining

More information

CPU Scheduling! Basic Concepts! Scheduling Criteria! Scheduling Algorithms!

CPU Scheduling! Basic Concepts! Scheduling Criteria! Scheduling Algorithms! CPU Scheduling! Basic Concepts! Scheduling Criteria! Scheduling Algorithms! First-Come-First-Served! Shortest-Job-First, Shortest-remaining-Time-First! Priority Scheduling! Round Robin! Multi-level Queue!

More information

Introduction to process scheduling. Process scheduling and schedulers Process scheduling criteria Process scheduling algorithms

Introduction to process scheduling. Process scheduling and schedulers Process scheduling criteria Process scheduling algorithms Lecture Overview Introduction to process scheduling Process scheduling and schedulers Process scheduling criteria Process scheduling algorithms First-come, first-serve Shortest-job-first Priority Round-robin

More information

3. Scheduling issues. Common approaches /1. Common approaches /2. Common approaches /3. 2012/13 UniPD / T. Vardanega 23/01/2013. Real-Time Systems 1

3. Scheduling issues. Common approaches /1. Common approaches /2. Common approaches /3. 2012/13 UniPD / T. Vardanega 23/01/2013. Real-Time Systems 1 Common approaches /1 3. Scheduling issues Clock-driven (time-driven) scheduling Scheduling decisions are made beforehand (off line) and carried out at predefined time instants The time instants normally

More information

CS420: Operating Systems

CS420: Operating Systems CPU Scheduling James Moscola Department of Engineering & Computer Science York College of Pennsylvania Based on Operating System Concepts, 9th Edition by Silberschatz, Galvin, Gagne Scheduling Concepts

More information

Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) CPU Scheduling: Overview. Scheduling: Components

Outline. V Computer Systems Organization II (Honors) (Introductory Operating Systems) CPU Scheduling: Overview. Scheduling: Components Outline V22.0202-001 Computer Systems Organization II (Honors) (Introductory Operating Systems) Lecture 10 CPU Scheduling February 23, 2005 Announcements Lab 3 due on March 2 nd, Demos on March 2 nd and

More information

CS 4410 Operating Systems. CPU Scheduling. Summer 2011 Cornell University

CS 4410 Operating Systems. CPU Scheduling. Summer 2011 Cornell University CS 4410 Operating Systems CPU Scheduling Summer 2011 Cornell University Today How does CPU manage the execution of simultaneously ready processes? Example Multitasking - Scheduling Scheduling Metrics Scheduling

More information

Scheduling. from CPUs to Clusters to Grids. MCSN N. Tonellotto Complements of Distributed Enabling Platforms

Scheduling. from CPUs to Clusters to Grids. MCSN N. Tonellotto Complements of Distributed Enabling Platforms Scheduling from CPUs to Clusters to Grids 1 Outline Terminology CPU Scheduling Real-time Scheduling Cluster Scheduling Grid Scheduling Cloud Scheduling 2 General Scheduling refers to allocate limited resources

More information

ECE3055 Computer Architecture and Operating Systems

ECE3055 Computer Architecture and Operating Systems ECE3055 Computer Architecture and Operating Systems Lecture: CPU Scheduling Prof. Hsien-Hsin Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology H.-H. S. Lee 1 Overview

More information

CPU SCHEDULING. Scheduling Objectives. Outline. Basic Concepts. Enforcement of fairness in allocating resources to processes

CPU 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 information

CPU Scheduling. User/Kernel Threads. Mixed User/Kernel Threads. Solaris/Linux Threads. CS 256/456 Dept. of Computer Science, University of Rochester

CPU Scheduling. User/Kernel Threads. Mixed User/Kernel Threads. Solaris/Linux Threads. CS 256/456 Dept. of Computer Science, University of Rochester CPU Scheduling CS 256/456 Dept. of Computer Science, University of Rochester User/Kernel Threads User threads Thread data structure is in user-mode memory scheduling/switching done at user mode Kernel

More information

Chapter 6: CPU Scheduling

Chapter 6: CPU Scheduling Chapter 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling 1.1 Maximum CPU utilization obtained with multiprogramming CPU I/O Burst

More information

Module 6: CPU Scheduling. Basic Concepts. Alternating Sequence of CPU And I/O Bursts

Module 6: CPU Scheduling. Basic Concepts. Alternating Sequence of CPU And I/O Bursts Module 6: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation Applied Operating System Concepts 6.1 Basic Concepts

More information

CPU scheduling. Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times. CPU Scheduler

CPU scheduling. Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times. CPU Scheduler CPU scheduling Alternating Sequence of CPU And I/O Bursts Maximum CPU utilization is obtained by multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait.

More information

Announcements Project #2. Basic Concepts

Announcements Project #2. Basic Concepts Announcements Project #2 Is due at 6:00 PM on Friday Program #3 Posted tomorrow (implements scheduler) Reading Chapter 6 Basic Concepts CPU I/O burst cycle Process execution consists of a cycle of CPU

More information

Aperiodic Task Scheduling

Aperiodic Task Scheduling Aperiodic Task Scheduling Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 12 Germany Springer, 2010 2014 年 11 月 19 日 These slides use Microsoft clip arts. Microsoft copyright

More information

Chapter 5: CPU Scheduling!

Chapter 5: CPU Scheduling! Chapter 5: CPU Scheduling! Basic Concepts! Scheduling Criteria! Scheduling Algorithms! Multiple-Processor Scheduling! Real-Time Scheduling! Algorithm Evaluation! 6.1! Basic Concepts! Long-term scheduler

More information

Announcement. Midterm Exam is on Monday June 8th. Office hours on Friday 2-3 pm. Exam Material will be posted on Piazza.

Announcement. Midterm Exam is on Monday June 8th. Office hours on Friday 2-3 pm. Exam Material will be posted on Piazza. Announcement Midterm Exam is on Monday June 8th. Office hours on Friday 2-3 pm. Exam Material will be posted on Piazza. Operating Systems: Internals and Design Principles Chapter 9 Uniprocessor Scheduling

More information

Chapter 6 Process Scheduling

Chapter 6 Process Scheduling 1 Chapter 6 Process Scheduling CPU scheduling deals with the problem of deciding which of the processes in the ready queue is to be allocated the CPU. There are many different CPU-scheduling algorithms.

More information

ECE3055 Computer Architecture and Operating Systems

ECE3055 Computer Architecture and Operating Systems ECE3055 Computer Architecture and Operating Systems Lecture: CPU Scheduling Prof. Hsien-Hsin Hsin Sean Lee School of Electrical and Computer Engineering Georgia Institute of Technology H.-H. S. Lee 1 Overview

More information

Threads & Introduction to CPU Scheduling

Threads & Introduction to CPU Scheduling Threads & Introduction to CPU Scheduling Mohammad S. Hasan Staffordshire University, UK Threads & Introduction to CPU Scheduling Slide 1 Lecture Outline Definition of a thread and types CPU -I/O burst

More information

Lecture 5- CPU Scheduling

Lecture 5- CPU Scheduling Lecture 5- CPU Scheduling Instructor : Bibhas Ghoshal (bibhas.ghoshal@iiita.ac.in) Autumn Semester, 2015 Bibhas Ghoshal IOSY 332C & IOPS 332C: OS Autumn Semester, 2015 1 / 17 Lecture Outline CPU Scheduling

More information

Real-time Scheduling of Periodic Tasks (1) Advanced Operating Systems Lecture 2

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

More information

EE8205: Embedded Computer System Multitasking and Real-time Operating System -- Problem Set 2014 Solutions

EE8205: Embedded Computer System Multitasking and Real-time Operating System -- Problem Set 2014 Solutions EE8205: Embedded Computer System Multitasking and Real-time Operating System -- Problem Set 2014 Solutions Out: November 26, 2014 P. 1: What is the difference between turnaround time and response time.

More information

Chapter 5: Process Scheduling. Operating System Concepts with Java 8 th Edition

Chapter 5: Process Scheduling. Operating System Concepts with Java 8 th Edition Chapter 5: Process Scheduling Operating System Concepts with Java 8 th Edition 5.1 Silberschatz, Galvin and Gagne 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms

More information

CSC 539: Operating Systems Structure and Design. Spring 2006

CSC 539: Operating Systems Structure and Design. Spring 2006 CSC 539: Operating Systems Structure and Design Spring 2006 CPU scheduling historical perspective CPU-I/O bursts preemptive vs. nonpreemptive scheduling scheduling criteria scheduling algorithms: FCFS,

More information