Uniprocessor scheduling

Slides:



Advertisements
Similar presentations
Uniprocessor Scheduling Chapter 9 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Advertisements

Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 9 Uniprocessor Scheduling
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Ceng Operating Systems Chapter 2.2 : Process Scheduling Process concept  Process scheduling Interprocess communication Deadlocks Threads.
6/25/2015Page 1 Process Scheduling B.Ramamurthy. 6/25/2015Page 2 Introduction An important aspect of multiprogramming is scheduling. The resources that.
7/12/2015Page 1 Process Scheduling B.Ramamurthy. 7/12/2015Page 2 Introduction An important aspect of multiprogramming is scheduling. The resources that.
1 Lecture 10: Uniprocessor Scheduling. 2 CPU Scheduling n The problem: scheduling the usage of a single processor among all the existing processes in.
Uniprocessor Scheduling
CPU Scheduling Chapter 6 Chapter 6.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Chapter 6 CPU SCHEDULING.
Uniprocessor Scheduling
Operating System 9 UNIPROCESSOR SCHEDULING. TYPES OF PROCESSOR SCHEDULING.
Uniprocessor Scheduling Chapter 9. Processor Scheduling Processor scheduling determines the assignment of processes to be executed by the processor over.
Uniprocessor Scheduling Chapter 9. Aim of Scheduling Assign processes to be executed by the processor or processors: –Response time –Throughput –Processor.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
Chapter 4 CPU Scheduling. 2 Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling Algorithm Evaluation.
Chapter 9 Uniprocessor Scheduling Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008,
Lecturer 5: Process Scheduling Process Scheduling  Criteria & Objectives Types of Scheduling  Long term  Medium term  Short term CPU Scheduling Algorithms.
CPU SCHEDULING.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Uniprocessor Scheduling
April 6, 2001 Gary Kimura Lecture #6 April 6, 2001
Uniprocessor Scheduling
CPU Scheduling Chapter 5.
Uniprocessor Scheduling
Chapter 2.2 : Process Scheduling
Process Scheduling B.Ramamurthy 9/16/2018.
Chapter 6: CPU Scheduling
Operating Systems CPU Scheduling.
Process Scheduling B.Ramamurthy 11/18/2018.
CPU Scheduling Basic Concepts Scheduling Criteria
CPU Scheduling G.Anuradha
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 5: CPU Scheduling
Uniprocessor Scheduling
OverView of Scheduling
Operating System Concepts
Uniprocessor scheduling
3: CPU Scheduling Basic Concepts Scheduling Criteria
Process Scheduling B.Ramamurthy 12/5/2018.
Chapter5: CPU Scheduling
TDC 311 Process Scheduling.
Chapter 5: CPU Scheduling
Chapter 9 Uniprocessor Scheduling
Chapter 6: CPU Scheduling
Operating System 9 UNIPROCESSOR SCHEDULING
Chapter 5: CPU Scheduling
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
Process Scheduling B.Ramamurthy 2/23/2019.
Processor Scheduling Hank Levy 1.
Process Scheduling B.Ramamurthy 4/11/2019.
Process Scheduling B.Ramamurthy 4/7/2019.
Process Scheduling B.Ramamurthy 4/19/2019.
Process Scheduling B.Ramamurthy 4/24/2019.
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Process Scheduling B.Ramamurthy 5/7/2019.
Chapter 6: Scheduling Algorithms Dr. Amjad Ali
CPU Scheduling ( Basic Concepts)
Chapter 6: CPU Scheduling
Uniprocessor Scheduling
Uniprocessor Scheduling
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

Uniprocessor scheduling B.Ramamurthy CSE421 4/12/2019 B.Ramamurthy

Introduction An important aspect of multiprogramming is scheduling. The resources that are scheduled are IO and processors. We will discuss uniprocessor scheduling here and multiprocessor scheduling in the next chapter. More specifically, we will discuss short-term scheduling. 4/12/2019 B.Ramamurthy

Topics for discussion Motivation Types of scheduling Short-term scheduling Various scheduling criteria Various algorithms Priority queues First-come, first-served Round-robin Shortest process first Shortest remaining time and others Queuing model - perf analysis 4/12/2019 B.Ramamurthy

Motivation Consider these programs with processing-component and IO-component indicated by upper-case and lower-case letters respectively. A1 a1 A2 a2 A3 0 30 50 80 120 130 ===> JOB A B1 b1 B2 0 20 40 60 ====> JOB B C1 c1 C2 c2 C3 c3 C4 c4 C5 0 10 20 60 80 100 110 130 140 150 =>JOB C 4/12/2019 B.Ramamurthy

Motivation The starting and ending time of each component are indicated beneath the symbolic references (A1, b1 etc.) Now lets consider three different ways for scheduling: no overlap, round-robin, simple overlap. Compare utilization U = Time CPU busy / Total run time 4/12/2019 B.Ramamurthy

Types of scheduling Long-term : To add to the pool of processes to be executed. Medium-term : To add to the number of processes that are in the main memory. Short-term : Which of the available processes will be executed by a processor? IO scheduling: To decide which process’s pending IO request shall be handled by an available IO device. 4/12/2019 B.Ramamurthy

Short-term scheduling Short-term scheduler is invoked whenever an event occurs that may lead to the interruption of the current process or that may warrant the preemption of the current process in favor of another. Clock-interrupts, IO interrupts, OS calls, signals, real-time system policies are some such events. The main objective of short-term scheduling is to allocate processor time in such a way as to optimize one or more aspects of system behavior. 4/12/2019 B.Ramamurthy

Short-term scheduling criteria User-oriented: Response time: is the elapsed time between the submission of a request until the response begins to appear at the output. Typical goal of such system should be maximize the number of users who would experience average or better than average response time. System-oriented: Throughput: is the rate at which processes are completed. Focus is on the efficient and effective use of processors. Utilization : % of time a processor is kept busy. 4/12/2019 B.Ramamurthy

Priority queues An important aspect of scheduling is the use of priorities. See Fig.9.4 One ready queue for each priority level; Or one priority queue. Insertion into the queue is done according to the priority. When released from a blocked queue, a process enters a queue according to its priority. 4/12/2019 B.Ramamurthy

Alternative scheduling policies A selection function determines which among the ready processes is next selected for execution Selection functions are based on one or more of these items: 1) w - time spent in system so far, waiting and executing. 2) e - time spent on execution so far. 3) s - total service time required by the process. 4) resources required by the process When to apply the selection function is dependent on whether a preemptive or non-preemptive scheduling is used. 4/12/2019 B.Ramamurthy

Case-study Lets study each of policies with a sample problem: Process Arrival time Service time =========================== 1 0 3 2 2 6 3 4 4 4 6 5 5 8 2 4/12/2019 B.Ramamurthy

First-come, First-serve Simplest of policies to implement. Tends to favor longer processes. Favor CPU-bound processes. Compute turn-around time and normalized turn-around time and compare. 4/12/2019 B.Ramamurthy

Round robin CPU is time-sliced among the ready processes. Time-quantum slightly higher than the typical interaction time. Appears fair but tends to favor CPU-bound jobs. 4/12/2019 B.Ramamurthy

Shortest process next This is of special interest since it requires prediction of the next process sizes depending on the history. What are the mechanisms available for such prediction? Simple averaging? Exponential averaging? Lets study exponential averaging. Read pages: 394-395, Fig.9.8 Exponential tracks changes fast; larger value of alpha results more rapid reaction to changes in observed values. Possible starvation of larger jobs. 4/12/2019 B.Ramamurthy

Shortest process next (contd.) Assume that a process is made of several cpu bursts. Each process has its own sequence of burst. From the pool of process now ready to run, OS has to predict the one that will have shortest burst. Initial process burst size is set to 0. (So = 0). Why? Want to let the process have priority over the existing ones so that you may be able get an idea of its burst times. 4/12/2019 B.Ramamurthy

Other policies See Fig. 9.5 and Table 9.4 Turnaround time = Finish time - Arrival time Normalized turnaround time = Turnaround time / service time Wait time = arrival time - start time 4/12/2019 B.Ramamurthy

Exercises 9.1, 9.2,9.4, 9.5 9.4 Assume the following burst times for a process: 6,4, 6,4, 13, 13, 13 and assume that the initial guess is 10. Plot. How did you arrive at this guess? What are the different ways of averaging? Which do you prefer? Why? 4/12/2019 B.Ramamurthy

Summary Scheduling is important for improving the system performance. Methods of prediction play an important role in Operating system and network functions. Simulation is a way of experimentally evaluating the performance of a technique. 4/12/2019 B.Ramamurthy