Outline. Chapter 5: Process Scheduling Yean Fu Wen Nov. 24, Basic Concepts Scheduling Criteria Scheduling Algorithms

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Outline. Chapter 5: Process Scheduling Yean Fu Wen Nov. 24, Basic Concepts Scheduling Criteria Scheduling Algorithms"

Transcription

1 Chapter 5: Process Scheduling Yean Fu Wen Nov. 24, 2009 Outline Basic Concepts Scheduling Criteria Scheduling Algorithms FCFS, SJF, Priority, RR, MQ, MFQ Thread Scheduling Multiple Processor Scheduling Operating System Examples Algorithm Evaluation 16:58 2 1

2 Basic Concepts The objective of multiprogramming is to have some processes running at all times maximize CPU utilization make the computer more productive CPU scheduling is the basis of multiprogramming OSs almost all computer resources are scheduled before use CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution CPU burst I/O wait I/O burst 16:58 3 Basic Concepts (cont.) CPU burst distribution measuring the durations of CPU bursts various greatly from process (computer) to process (computer) characterized as exponential or hyperexponential the distribution can be important in the selection of CPU scheduling algorithm 16:58 4 2

3 CPU Scheduler (Short term Scheduler) The CPU scheduler selects from the processes in memory that are ready to execute, and allocates the CPU to one of them ready queue can be a FIFO queue, a priority queue, a tree the records in the queue are PCBs CPU scheduling decisions may take place when a process: 1. switches from running to waiting state (e.g., I/O request) 2.switches from running to ready state (e.g., interrupt) 3.switches from waiting to ready 4.terminates Scheduling only under 1 and 4 is nonpreemptive (cooperative) the process keeps CPU until it terminates or switches to the waiting state does not require the special hardware (e.g., timer) e.g., Windows 3.x, the previous systems of Mac OS X All other scheduling is preemptive unfortunately, introduces some problems e.g., data sharing, kernel design, interrupt handlers 16:58 5 Dispatcher Dispatcher module gives control of the CPU to the process selected by the short term scheduler; this module involves: switching context switching to user mode jumping to the proper location in the user program to restart that program Dispatch latency time it takes for the dispatcher to stop one process and start another running should be as fast as possible 16:58 6 3

4 Scheduling Criteria Criteria for comparing CPU scheduling algorithms: CPU utilization keep the CPU as busy as possible in a real system, 40% ~ 90% Throughput # of processes that are completed per time unit Turnaround time amount of time to execute a particular process the period from new state to terminated state Waiting time amount of time a process has been waiting in the ready queue usually, each various scheduling algorithm affects only the waiting time Response time amount of time it takes from the submission of a request until the first response is produced not until output the whole response (this is the turnaround time) this criterion is more meaningful in an interactive system 16:58 7 Scheduling Criteria (cont.) Optimization Criteria Max CPU utilization Max throughput Min turnaround time Min waiting time Min response time for interactive systems, it is more important to minimize the variance in the response time than to minimize the average response time 16:58 8 4

5 First Come, First Served (FCFS) Scheduling Process Burst Time P 1 24 P 2 3 P 3 3 Suppose that the processes arrive in the order: P 1, P 2, P 3 The Gantt Chart for the schedule is: P 1 P 2 P wait 0 milliseconds wait 24 milliseconds wait 27 milliseconds The average waiting time is ( )/3 = 17 milliseconds 16:58 9 FCFS Scheduling (cont.) Suppose that the processes arrive in the order: P 2, P 3, P 1 The Gantt chart for the schedule is: P 2 P 3 P wait 0 milliseconds wait 3 milliseconds wait 6 milliseconds The average waiting time is (6+0+3)/3 = 3 milliseconds Much better than previous case Convoy effect short processes behind long process e.g., the 1 st case lower CPU and device utilization The scheduler is nonpreemptive (releasing CPU until termination or waiting I/O) implemented with a FIFO queue 16:

6 Shortest Job First (SJF) Scheduling Associate with each process the length of its next CPU burst and use these lengths to schedule the process with the shortest time = shortest next CPU burst algorithm if two processes have the same shortest bursts, FCFS scheduling is used Two schemes: nonpreemptive once CPU given to the process it cannot be preempted until completes its CPU burst preemptive if a new process arrives with CPU burst length less than remaining i time of current executing process, preempt. This scheme is know as the Shortest Remaining Time First (SRTF) scheduling SJF is optimal gives minimum average waiting time for a given set of processes 16:58 11 SJF Scheduling (cont.) Example of non preemptive SJF Process Burst Time P 1,P 2,P 3,P 4 P 1 6 P 2 8 P 3 7 P P 4 P 1 P 3 P Average waiting time = ( )/4 = 7 NOTE: using FCFS scheduling, the average waiting time = P 1,P 2,P 3,P 4 P 1 P 2 P 3 P :

7 SJF Scheduling (cont.) Example of preemptive SJF P 1 P 2 P 3 P 4 Process Arrival Time Burst Time P P P P P 2 P 1 P 4 P P 1 Average waiting time = ((10 1)+0+(17 2)+(5 3))/4 = 6.5 NOTE: using nonpreemptive SJF, the average waiting time = (0+(8 1)+(17 2)+(12 3))/4 = 7.75 P 1 P 2 P 3 P 4 P 2 P 4 P 1 P :58 13 SJF Scheduling (cont.) Determining length of next CPU burst Can only estimate the length Can be done by using the length of previous CPU bursts, using exponential averaging 1. τ n = the previous predicted value for n th CPU burst (the past history) 2. t n = actual length of n th CPU burst (the most recent information) 3. τ n+1 = predicted value for the next CPU burst 4. α, 0 α 1 (the relative weight of the recent and past history) 5. define: τ n+1 = αt n + (1-α)τ n τ0 is a constant or overall system average p.157 i=0 i=1 t 16:58 1 = α = 1/2 τ 0 = 10 (the defaulted predicted value for t 0 ) t 0 = 6 (measured) τ 1 = ½(t 1 )+ ½(τ 0 ) = 8 (the predicted value for t 1 ) 7

8 SJF Scheduling (cont.) The SJF scheduling algorithm is optimal!! It gives the minimum average waiting time for a given set of processes. Why? Moving a short process before a long one decreases the waiting time of the short process more than it increases the waiting time of the long process. But how can we obtain the length of the next CPU burst?? It is impossible to do so However, we can try our best to predict the length. We expect that the next CPU burst will be similar in length to the previous ones. And pick the process with the shortest predicted CPU burst. ( 1 α ). τ n = α t + τ + 1 n n [0,1], control the relative weight of recent and past history in prediction The predicted value for the bext CPU burst The length of the nth CPU burst The last prediction 16:58 15 Priority Scheduling A priority number (integer) is associated with each process usually, low numbers are used to represent high priority the number can be defined internally: based on measurable quantity within the system externally: based on criteria outside OS, e.g., importance, user type SJF is a special case of priority scheduling priority is the inverse of the predicted next CPU burst time The CPU is allocated to the process with the highest priority Preemptive nonpreemptive Problem Starvation low priority processes may never execute e.g., amazing IBM 7094 Solution Aging as time progresses increase the priority of the process 16:

9 Round Robin (RR) Scheduling RR scheduling is designed especially for time sharing systems similar to FCFS, but each process gets a small unit of CPU time named time quantum (time slice) usually milliseconds after this time has elapsed, the process is preempted and added to the end of the ready queue the scheduler picks the next process from the (FIFO) ready queue If there are n processes in the ready queue and the time quantum is q No process waits more than (n-1)q time units. Example of RR with time quantum = 4 Process Arrival Time Burst Time P P P P 1 P 2 P 3 P 1 P 1 P 1 P 1 P Average waiting time = (6+4+7)/3 = :58 17 Round Robin Scheduling (cont.) Turnaround time varies with the time quantum q large equal to FCFS q small q must be large with respect to context switch, otherwise overhead is too high based on special hardware, extremely small time quantum is possible, the RR is called processor sharing that each process has its own (slower/virtual) CPU Typically, higher average turnaround than SJF, but better response time Guideline: 80% of the CPU bursts should be shorter than the time quantum 16:

10 Multilevel Queue Ready queue is partitioned into separate queues: foreground (for interactive processes) background (for batch processes) Each queue has its own scheduling algorithm foreground RR background FCFS Scheduling must be done among the queues Fixed priority ypreemptive p scheduling; (i.e., serve all from foreground then from background). Possibility of starvation. Time slice each queue gets a certain amount of CPU time which it can schedule among its processes; i.e., 80% to foreground in RR 20% to background in FCFS 16:58 19 Multilevel Feedback Queue A process can move between the various queues demoting a process uses too much CPU time, it ll be moved to a lower priority yqueue updating a process waiting too long in a lower priority queue may be moved to a higher priority queue MFQ is the most general CPU scheduling algorithm aging can be implemented this way Multilevel feedback queue scheduler defined by the following parameters: number of queues scheduling algorithms for each queue method used to determine when to upgrade a process method used to determine when to demote a process method used to determine which queue a process will enter (when that process needs service) 16:

11 Multilevel Feedback Queue Example of multilevel feedback queue with three queues: Q 0 RR with time quantum 8 ms. Q 1 RR with time quantum 16 ms. Q 2 FCFS Scheduling A new job enters queue Q 0 which is served with RR. When it gains CPU, job receives 8 milliseconds. If it does not finish in 8 milliseconds, job is moved to queue Q 1. At Q 1, job is again served with RR and receives 16 additional milliseconds. If it still does not complete, it is preempted and moved to queue Q 2. 16:58 21 Thread Scheduling Thread scheduling kernel level threads scheduled by the OS user level threads managed by the thread library (controlled by the programmer) to run on a CPU, the user level thread must be mapped to an associated kernel level thread Process contention scope (PCS) competition for CPU takes place among threads belonging to the same process Local Scheduling the thread library decides which user level thread to put onto an available LWP tpicall typically, according to priority (set by the programmer) preemption mode NOTE: it does not mean that the thread is actually running on a CPU to run on a CPU, the mapped kernel thread (LWP) must also be scheduled (by SCS) 16:

12 Thread Scheduling (cont.) System contention scope (SCS) competition for CPU takes place among all (kernel) threads in the system Global Scheduling the kernel decides which kernel thread to run next systems using 1 to 1 model (e.g., XP, Linux) schedule threads using only SCS Pthread scheduling API pthread_attr_setscope(pthread_attr_t *attr, int scope) pthread_attr_getscope(pthread_attr_t *attr, int *scope) PCS: scope = PTHREAD_SCOPE_PROCESS SCS: scope = PTHREAD_SCOPE_SYSTEM NOTE: Pthread in Linux and Mac OS X systems allows only PTHREAD_SCOPE_SYSTEM 16:58 23 #include <pthread.h> #include <stdio.h> #define NUM THREADS 5 int main(int argc, char *argv[]) { int i; pthread t tid[num THREADS]; pthread attr t attr; /* get the default attributes */ pthread attr init(&attr); /* set the scheduling algorithm to PROCESS or SYSTEM */ pthread attr setscope(&attr, PTHREAD SCOPE SYSTEM); /* set the scheduling policy - FIFO, RT, or OTHER */ pthread attr setschedpolicy(&attr, SCHED OTHER); /* create the threads */ for (i = 0; i < NUM THREADS; i++) pthread create(&tid[i],&attr,runner,null); /* now join on each thread */ for (i = 0; i < NUM THREADS; i++) pthread join(tid[i], NULL); } /* Each thread will begin control in this function */ void *runner(void *param) { printf("i am a thread\n"); pthread exit(0); 16:58 } 24 12

13 Multiple Processor Scheduling When multiple CPUs are available CPU scheduling are more complex load sharing becomes possible Homogeneous: the processors are identical in terms of their functionality Approaches to multiprocessor scheduling Asymmetric multiprocessing a single processor handles all scheduling decisions, I/O processing the master server other processors execute only user code Symmetric multiprocessing (SMP) each processor is self scheduling the scheduler must ensure that two processors do not choose the same process from the ready queue all modern OSs support SMP 16:58 25 Multiple Processor Scheduling (cont.) Processor affinity most SMP systems try to keep a process running on the same processor e.g., eg if a process migrates to a new processor, the content of cache memory (for the old processor) must be invalidated the data re populates the cache for the new processor two possible forms soft affinity: the scheduler does not guarantee affinity hard affinity: (Linux) provides system calls to keep the process always on the same processor Load balancing keeping the workload evenly distributed across all processors in SMP needed on systems where each processor has its own private ready queue most modern OSs supporting SMP belong to this type counteracting the benefits of processor affinity 16:

14 Multiple Processor Scheduling (cont.) Load balancing (cont.) two general approaches push migration: a specific task periodically checks each processor s load and moves process from overloaded to less busy processors pull migration: an idle processor actively pulls a waiting (ready) task from a busy processor Symmetric multithreading (SMT) providing multiple logical processors to run threads concurrently each logical processor has its own architecture state (i.e., general purpose registers, machine state registers ) interrupts are handled by the logical processor on the same physical CPU, all logical l processors share ALU, cache, bus called hyperthreading (HT) technology on Intel CPUs SMT is provide in hardware, not software but the performance may be improved if OS/scheduler is aware of SMT 16:58 27 Multicore Processors Recent trend to place multiple processor cores on same physical chip Faster and consume less power Multiple threads per core also growing Takes advantage of memory stall to make progress on another thread while memory retrieve happens Multithreaded Multicore System 16:

15 Operating System Examples Solaris scheduling Windows XP scheduling Linux scheduling does not distinguish between processes and threads task 16:58 29 Example: Solaris Scheduling 4 pre defined classes of scheduling real time system time sharing interactive each class has a set of priorities and scheduling algorithm the scheduler converts the class specific priorities into global priorities and selects the highest priority thread to run 16:58 (ms.) The dispatch table for interactive and timesharing threads including 60 priority levels: a bigger number a higher priority a higher priority has a smaller time slice the number within time quantum expired and return from sleep is the new priority (number) for redispatching the thread 30 15

16 Example: Solaris Scheduling Time sharing the default class of a process multilevel feedback queue 16: Example: Windows XP Scheduling Windows XP scheduler called dispatcher a priority based, preemptive scheduling algo. using a 32 level l priority i scheme 16~32: real time class the thread priority is fixed 1~15: variable priority class containing 5 classes the priority of thread can be changed within the class each class has 7 relative priorities the NORMAL relative priority is the base priority for each class when a thread s time quantum runs out, its priority is lowered when a variable priority thread returns from waiting queue, the dispatcher boosts its priority depending on what the thread was waiting for tending to give good response times to interactive threads 16:

17 Example: Linux Scheduling Linux scheduler (after version 2.5) preemptive and priority based lower (nice) value indicates higher priority higher priority task has longer quantum running in constant time (O(1)) supporting for SMP each processor has its own runqueue and schedules itself independently providing processor affinity load balancing fairness and support for interactive tasks Runqueue data structure active array: containing tasks with time remaining in their time slices expired array: containing expired tasks before moving a (dynamic priority) task from active to expired array, its new priority and corresponding time slice must be re calculated (refer to the next page) 16:58 if the active array is empty, two arrays are exchanged 33 Example: Linux Scheduling (cont.) Real time scheduling POSIX.1b compliant static priority is assigned its priority is unchanged while the task is moved from active to expired array Dynamic priority task scheduling the priority number is called nice value the task is more interactive has longer sleep time (for I/O) the new nice value = the old nice value - 5 higher h priority if the task is CPU bound has shorter sleep time the new nice value = the old nice value + 5 lower priority 16:

18 Algorithm Evaluation How do we select a CPU scheduling algorithm for a particular system? first of all, defining fii the criteria. i e.g., maximizing CPU utilization under the constraint that the max response time is 1 sec. then we evaluate the algorithms under consideration Possible evaluation methods (also suitable for network, system performance ) Deterministic modeling Queuing models Simulations Implementation 16:58 35 Evaluation: Deterministic Modeling Deterministic modeling one type of analytic evaluation takes tk a particular predetermined dt d workload and defines the performance of each algorithm for that workload simple and fast FCFS algorithm: its answers apply only to those cases over a set of examples, it may indicate trends the average waiting time = ( )/5 = 28 ms. nonpreemptive SJF scheduling: 16:58 Process Burst Time P 1 10 P 2 29 P 3 3 P 4 7 P 5 12 the average waiting time = ( )/5 = 13 ms. RR algorithm (time quantum=10 ms.): the average waiting time = ( )/5 = 23 ms. 18

19 Evaluation: Queueing Models The problem of deterministic modeling the processes that are run vary from day to day no static information Queuing model is based on mathematical formulas describing the system behavior the distribution of CPU and I/O bursts for processes in a system the arrival time distribution of new processes computing the average throughput, utilization, waiting time Example: Little s formula n = the average queue length n = λ x W λ= the arrival rate for new processes it ti The limitations of queuing analysis W = the average waiting time the classes of algo. and distributions that can be handled are limited the mathematics may be too complicated to work with it s necessary to make many assumptions, which may not be accurate queueing models are often only approximations of real systems 16:58 37 Evaluation: Simulations To get more accurate evaluation can be expensive more computer time more detailed simulation more accurate result trace tapes require large amounts of storage space Running simulation involves a model of the computer system including a clock variable software data structures input data distribution drivendriven mathematically empirically trace tapes statistic output 16:

20 Evaluation: Implementation The difficulty with this approach high cost coding the algorithm modifying the OS to support it handling the reaction of the users to a constantly changing the system the environment will change since the new scheduler the programmer may adjust the behavior of processes to gain more benefit from the new scheduler 16:

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

Chapter 5: CPU Scheduling

Chapter 5: CPU Scheduling COP 4610: Introduction to Operating Systems (Spring 2016) Chapter 5: CPU Scheduling Zhi Wang Florida State University Contents Basic concepts Scheduling criteria Scheduling algorithms Thread scheduling

More information

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed

I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed I.-C. Lin, Assistant Professor. Textbook: Operating System Concepts 8ed CHAPTER 5: PROCESS SCHEDULING Chapter 5: Process Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor

More information

5.1 Basic Concepts. Chapter 5: Process Scheduling. Alternating Sequence of CPU And I/O Bursts. 5.1 Basic Concepts

5.1 Basic Concepts. Chapter 5: Process Scheduling. Alternating Sequence of CPU And I/O Bursts. 5.1 Basic Concepts 5.1 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 Chapter 5: Process

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

Lecture 5 Process Scheduling (chapter 5)

Lecture 5 Process Scheduling (chapter 5) Bilkent University Department of Computer Engineering CS342 Operating Systems Lecture 5 Process Scheduling (chapter 5) Dr. İbrahim Körpeoğlu http://www.cs.bilkent.edu.tr/~korpe 1 References The slides

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

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

Chapter 5: Process Scheduling

Chapter 5: Process Scheduling 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

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 Operating

More information

Chapter 5: CPU Scheduling. Chapter 5: CPU Scheduling. Basic Concepts. Histogram of CPU-burst Times. CPU Scheduler

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

Chapter 5: CPU Scheduling. Chapter 5: CPU Scheduling

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

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

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling Objectives To introduce CPU scheduling To describe various CPU-scheduling algorithms Chapter 5: Process Scheduling To discuss evaluation criteria for selecting the CPUscheduling algorithm for a particular

More information

Objectives. 5.1 Basic Concepts. Scheduling Criteria. Multiple-Processor Scheduling. Algorithm Evaluation. Maximum CPU.

Objectives. 5.1 Basic Concepts. Scheduling Criteria. Multiple-Processor Scheduling. Algorithm Evaluation. Maximum CPU. Chapter 5: Process Scheduling Objectives To introduce CPU scheduling To describe various CPU-scheduling algorithms To discuss evaluation criteria for selecting the CPU-scheduling algorithm for a particular

More information

spends most its time performing I/O How is thread scheduling different from process scheduling? What are the issues in multiple-processor scheduling?

spends most its time performing I/O How is thread scheduling different from process scheduling? What are the issues in multiple-processor scheduling? CPU Scheduling Outline What is scheduling in the OS? What are common scheduling criteria? How to evaluate scheduling algorithms? What are common scheduling algorithms? How is thread scheduling different

More information

CPU Scheduling Outline

CPU Scheduling Outline CPU Scheduling Outline What is scheduling in the OS? What are common scheduling criteria? How to evaluate scheduling algorithms? What are common scheduling algorithms? How is thread scheduling different

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

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

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

Round Robin (RR) ACSC 271 Operating Systems. RR Example. RR Scheduling. Lecture 9: Scheduling Algorithms

Round Robin (RR) ACSC 271 Operating Systems. RR Example. RR Scheduling. Lecture 9: Scheduling Algorithms Round Robin (RR) ACSC 271 Operating Systems Lecture 9: Scheduling Algorithms Each process gets a small unit of CPU time (time quantum), usually 10-100 milliseconds. After this time has elapsed, the process

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

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

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

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

Chapter 5: CPU Scheduling. Operating System Concepts with Java 8 th Edition Chapter 5: CPU Scheduling 5.1 Silberschatz, Galvin and Gagne 2009 Basic Concepts Maximum CPU utilization obtained with multiprogramming CPU I/O Burst Cycle Process execution consists of a cycle of CPU

More information

CS307 Operating Systems CPU Scheduling

CS307 Operating Systems CPU Scheduling CS307 CPU Scheduling Fan Wu Department of Computer Science and Engineering Shanghai Jiao Tong University Spring 2016 Basic Concepts Maximize CPU utilization obtained with multiprogramming CPU I/O Burst

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

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

Chapter 5 Process Scheduling

Chapter 5 Process Scheduling Chapter 5 Process Scheduling CPU Scheduling Objective: Basic Scheduling Concepts CPU Scheduling Algorithms Why Multiprogramming? Maximize CPU/Resources Utilization (Based on Some Criteria) CPU Scheduling

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

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 Operating

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

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

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

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

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

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

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

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

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

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

CPU Scheduling. Dr. Yingwu Zhu

CPU Scheduling. Dr. Yingwu Zhu CPU Scheduling Dr. Yingwu Zhu Overview In discussing process/threads management and synchronization, we talked about context switching among processes/threads on the ready queue But we have not glossed

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

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

CPU Scheduling. Operating System Concepts. Alternating Sequence of CPU And I/O Bursts. Basic Concepts. CPU Scheduler. Histogram of CPU-burst Times Operating System Concepts Module 5: CPU SCHEDULING Andrzej Bednarski, Ph.D. student Department of Computer and Information Science Linköping University, Sweden CPU Scheduling Basic Concepts Scheduling

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

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

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

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

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

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

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

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

Average waiting time = [(10-1)+(1-1)+(17-2)+(5-3)]/4 = 26/4 = 6.5 msec

Average waiting time = [(10-1)+(1-1)+(17-2)+(5-3)]/4 = 26/4 = 6.5 msec Example of Shortest-remaining-time-first i.e. Preemptive SJF Now we add the concepts of varying arrival times and preemption to the analysis ProcessAarri Arrival TimeT Burst Time P 1 0 8 P 2 1 4 P 3 2

More information

Introduction to Scheduling 1

Introduction to Scheduling 1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms FCFS, SJF, RR Exponential Averaging Multi-level Queue Scheduling Performance Evaluation Scheduling Terminology Scheduling Terminology

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

III. Process Scheduling

III. Process Scheduling Intended Schedule III. Process Scheduling Date Lecture Hand out Submission 0 20.04. Introduction to Operating Systems Course registration 1 27.04. Systems Programming using C (File Subsystem) 1. Assignment

More information

III. Process Scheduling

III. Process Scheduling III. Process Scheduling 1 Intended Schedule Date Lecture Hand out Submission 0 20.04. Introduction to Operating Systems Course registration 1 27.04. Systems Programming using C (File Subsystem) 1. Assignment

More information

Chapter 5 CPU Scheduling

Chapter 5 CPU Scheduling Chapter 5 CPU Scheduling CPU Scheduling 1 Outline! Basic Concepts.! Scheduling Criteria.! Scheduling Algorithms.! Multiple-Processor Scheduling.! Thread Scheduling.! Operating Systems Examples.! Algorithm

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

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

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems Based on original slides by Silberschatz, Galvin and Gagne 1 Basic Concepts CPU I/O Burst Cycle Process execution

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

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

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

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading

Announcements. Basic Concepts. Histogram of Typical CPU- Burst Times. Dispatcher. CPU Scheduler. Burst Cycle. Reading Announcements Reading Chapter 5 Chapter 7 (Monday or Wednesday) Basic Concepts CPU I/O burst cycle Process execution consists of a cycle of CPU execution and I/O wait. CPU burst distribution What are the

More information

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances: Scheduling Scheduling Scheduling levels Long-term scheduling. Selects which jobs shall be allowed to enter the system. Only used in batch systems. Medium-term scheduling. Performs swapin-swapout operations

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

Process Management. Processes. CS 502 Spring 99 WPI MetroWest/Southboro Campus

Process Management. Processes. CS 502 Spring 99 WPI MetroWest/Southboro Campus Process Management CS 502 Spring 99 WPI MetroWest/Southboro Campus Processes Process Concept Process Scheduling Operations on Processes Cooperating Processes Threads Interprocess Communication 1 1 Process

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

Admin. Threads, CPU Scheduling. Yesterday s Lecture: Threads. Today s Lecture. ITS 225: Operating Systems. Lecture 4

Admin. Threads, CPU Scheduling. Yesterday s Lecture: Threads. Today s Lecture. ITS 225: Operating Systems. Lecture 4 ITS 225: Operating Systems Admin Lecture 4 Threads, CPU Scheduling Jan 23, 2004 Dr. Matthew Dailey Information Technology Program Sirindhorn International Institute of Technology Thammasat University Some

More information

Operating System: Scheduling

Operating System: Scheduling Process Management Operating System: Scheduling OS maintains a data structure for each process called Process Control Block (PCB) Information associated with each PCB: Process state: e.g. ready, or waiting

More information

Chapter 5: Process Scheduling

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

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

Chapter 6: CPU Scheduling

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

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

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Scheduling & Resource Utilization

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Scheduling & Resource Utilization Road Map Scheduling Dickinson College Computer Science 354 Spring 2012 Past: What an OS is, why we have them, what they do. Base hardware and support for operating systems Process Management Threads Present:

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. Core Definitions

CPU Scheduling. Core Definitions CPU Scheduling General rule keep the CPU busy; an idle CPU is a wasted CPU Major source of CPU idleness: I/O (or waiting for it) Many programs have a characteristic CPU I/O burst cycle alternating phases

More information

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput

2. is the number of processes that are completed per time unit. A) CPU utilization B) Response time C) Turnaround time D) Throughput Import Settings: Base Settings: Brownstone Default Highest Answer Letter: D Multiple Keywords in Same Paragraph: No Chapter: Chapter 5 Multiple Choice 1. Which of the following is true of cooperative scheduling?

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

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010.

Road Map. Scheduling. Types of Scheduling. Scheduling. CPU Scheduling. Job Scheduling. Dickinson College Computer Science 354 Spring 2010. Road Map Scheduling Dickinson College Computer Science 354 Spring 2010 Past: What an OS is, why we have them, what they do. Base hardware and support for operating systems Process Management Threads Present:

More information

CPU Scheduling Algorithms

CPU Scheduling Algorithms CPU Scheduling Algorithms Notice: The slides for this lecture have been largely based on those from the course text Operating Systems Concepts, 9th ed., by Silberschatz, Galvin, and Gagne. Many, if not

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

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: CPU Scheduling

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: CPU Scheduling Computer Science 322 Operating Systems Mount Holyoke College Spring 2008 Topic Notes: CPU Scheduling The CPU is the first of several scarce resources that we will consider. A primary function of an operating

More information

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS

CPU SCHEDULING (CONT D) NESTED SCHEDULING FUNCTIONS CPU SCHEDULING CPU SCHEDULING (CONT D) Aims to assign processes to be executed by the CPU in a way that meets system objectives such as response time, throughput, and processor efficiency Broken down into

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 2009 Chapter 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Thread Scheduling Multiple-Processor Scheduling Operating

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

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

Chapter 6: CPU Scheduling. Basic Concepts

Chapter 6: CPU Scheduling. Basic Concepts Chater 6: CPU Scheduling Basic Concets Scheduling Criteria Scheduling Algorithms Multile-Processor Scheduling Real-Time Scheduling Thread Scheduling Oerating Systems Examles Java Thread Scheduling Algorithm

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 CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff

Process Scheduling CS 241. February 24, 2012. Copyright University of Illinois CS 241 Staff Process Scheduling CS 241 February 24, 2012 Copyright University of Illinois CS 241 Staff 1 Announcements Mid-semester feedback survey (linked off web page) MP4 due Friday (not Tuesday) Midterm Next Tuesday,

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

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

Escalonamento de Processos

Escalonamento de Processos Escalonamento de Processos SLIDES 6B Short-Term Scheduling Known as the dispatcher Executes most frequently Invoked when an event occurs Clock interrupts I/O interrupts Operating system calls Signals Scheduling

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