Operating Systems: Internals and Design Principles

Chapter 9 Uniprocessor Scheduling Seventh Edition By William Stallings

Dave Bremer Otago Polytechnic, N.Z.

Process Scheduling Aim is to assign processes to be executed by the processor in a way that meets system (performance) objectives, such as response time, throughput, and processor efficiency Broken down into three separate functions:  Long-Term scheduling Medium-Term scheduling Short-Term scheduling

Nested Form of Scheduling


Terminologies CPU utilization – keep the CPU as busy as possible Throughput – # of processes that complete their execution per time unit Turnaround time – amount of time to execute a particular process waiting to get into memory + waiting in the ready queue + executing on the CPU + I/O

Waiting time – amount of time a process has been waiting in the ready queue Response time – amount of time it takes from when a request was submitted until the first response is produced, not output (for time-sharing environment)

Optimization Criteria  Maximize CPU utilization  Maximize throughput  Minimize turnaround time  Minimize waiting time  Minimize response time In most cases we optimize the average measure In some circumstances we want to optimize the min or max values rather than the average – e.g., minimize the max response time so all users get good service

Next CPU burst • Can only estimate the length. • Can be done by using the length of previous CPU bursts, using exponential averaging. 1. t n  actuallenght of n thCP U burst 2.  n 1  predictedvalue for thenext CP U burst 3.  , 0    1 4. Define: 5. If   0 then n 1   n and t n is ignored 6. If   1 then n 1  t n and n is ignored 7. Morecommonly,  1 2 so recentand past historyare equally weighted

Priority Scheduling • A priority number (integer) is associated with each process • The CPU is allocated to the process with the highest priority (smallest integer  highest priority). – Can be preemptive (compares priority of process that has arrived at the ready queue with priority of currently running process) or non-preemptive (put at the head of the ready queue)

• SJF is a priority scheduling where priority is the predicted next CPU burst time. • Problem  Starvation – low priority processes may never execute. • Solution  Aging – as time progresses increase the priority of the process.

Priority Scheduling Process

Burst Time

















Turnaround Time Varies With The Time Quantum

The average turnaround time of a set of processes does not necessarily improve as the time quantum size increases In general, it can be improved if most processes finish their next CPU burst in a single time quantum

Multilevel Queue Ready queue is partitioned into separate queues: foreground (interactive) background (batch) Each queue has its own scheduling algorithm, foreground – RR background – FCFS Scheduling must be done between the queues. – Fixed priority 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 amongst its processes; i.e., 80% to foreground in RR, 20% to background in FCFS

Multilevel Queue Scheduling

Each queue has absolute priority over lower priority queues A lower priority process that is executing would be preempted if a higher priority process arrived

Windows XP Priorities

Priority based, preemptive scheduling algorithm; highest priority always runs Priorities are divided into two classes 

Variable class – 1 through 15 and Real time class – 16 through 31

Priority is based on priority class it belongs to (realtime, high etc) and the relative priority within each class  

When a threads quantum runs out the thread is interrupt ed. If it is in the variable priority class its priority is lowered (never below the base priority for that class) Gives good response to interactive threads (mouse, windows) and enables I/O bound threads to keep the I/O devices busy while compute bound use spare CPU cycles in the background

Schedule the processes

Summary • The operating system must make three types of scheduling decisions with respect to the execution of processes: • Long-term – determines when new processes are admitted to the system • Medium-term – part of the swapping function and determines when a program is brought into main memory so that it may be executed • Short-term – determines which ready process will be executed next by the processor • From a user’s point of view, response time is generally the most important characteristic of a system; from a system point of view, throughput or processor utilization is important

• Algorithms: » FCFS, Round Robin, SPN, SRT, HRRN, Feedback

Chapter 9 Uniprocessor Scheduling

Long-Term scheduling. ➢Medium-Term scheduling. ➢Short-Term scheduling ... A priority number (integer) is associated with each process. • The CPU is allocated to the process with the highest priority (smallest integer ≡ highest priority). – Can be preemptive (compares priority of process that has arrived at the ready ...

1MB Sizes 2 Downloads 352 Views

Recommend Documents

Chapter 9
9.1 Introduction. In mathematics, the word, “sequence” is used in much the same way as it is in ordinary English. When we say that a collection of objects is listed ...

chapter 9-Sectionalism.pdf
Page 3 of 14. Page 3 of 14. chapter 9-Sectionalism.pdf. chapter 9-Sectionalism.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying chapter 9-Sectionalism.pdf. Page 1 of 14.Missing:

Chapter 9 exer.pdf
(c) U.S. Cellular Field, home of the White Sox, is located at. 35th and Princeton, which is 3 blocks west of State Street. and 35 blocks south of Madison. Write the ...

Chapter 9.pdf
crusade called the Elementary and Secondary Education. Act (ESEA) in ... Later, President Jimmy Carter wanted the United States to. start competing ... averaging 304 points out of 500. Now, I'm not a math. 3 http://atlas.newamerica.org/school-finance

chapter 9-Sectionalism.pdf
machinery, steam engines,. interchangeable parts, canals,. railroads, and the telegraph, as well. as agricultural inventions, both. extended markets and brought.

chapter 9 NYQUIST.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. chapter 9 NYQUIST.pdf. chapter 9 NYQUIST.pdf. Open. Extract.

Chapter 9 Answers - BISD Moodle
[24( ).] 39. Roughly 3.5 square units. (The area of the circle appears to be about halfway ..... relates an amusing story about a phone call from ... Cut from the center of the cake through ..... miles per hour and its human “engine” power was.

Chapter 9 - Services.pdf
Page 3 of 20. Chapter 9 - Services.pdf. Chapter 9 - Services.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Chapter 9 - Services.pdf.

Chapter 9 Clean 2016.01.21.pdf
Statement of Purpose. These Board Rules are adopted to implement the Board's. authority to: (a) Conduct investigations, hearings, and proceedings concerning:.

Page 2 of 9. 108 109. Dubai Private Sector Innovation Index. “The macroeconomic is a. view of today , while the. microeconomic factors into. the future”. Comparison of Micro and Macro results. For a complete picture of the innovation. in a city t

Copy of Chapter 9.pdf
royal court sometimes rose to power. Important Government Officials. Three important officials were the vizier, the chief treasurer, and the general of the armies.

Chapter 9 Question Cards.pdf
5 What is the length of a term of office for. the president of the United States? Executive Branch. 6 Who has the power to nominate. ambassadors, Supreme Court ...

Chapter 1 Data Transmission and Beacon Scheduling ...
data transmission scheduling, but only MASM can be used for beacon scheduling ...... 1.7 (a)), then the end-to-end packet delivery latency can be minimized.

Chapter 9 - Frontiers of Biotechnology.pdf
DNA Manipulation Tools. • Genetic Engineering. • Genomics. BIOLOGY. RESOURCE CENTER. BIOLOGY CLASSZONE.COM. 262 Unit 3: Genetics. Page 1 of ...

Chapter 9 Practice Test.pdf
y x. x-intercept(s): y-intercept(s):. vertex: focus: directrix: axis of symmetry: b). 4 20 2 ... 3 2 25 2 2. x y ... Page 2 of 2. Chapter 9 Practice Test.pdf.

AIFFD Chapter 9 - Size Structure - GitHub
May 14, 2015 - 9.1 Testing for Differences in Mean Length by Means of Analysis of .... response~factor and the data= argument set equal to the data frame ...

Chapter 9-MySQL-Advanced.pdf
Integrity Constraints. One of the major responsibility of a DBMS is to maintain the. Integrity of the data i.e. Data being stored in the Database. must be correct and ...

Chapter 9 Practice Final Quiz
Page 1. Scanned by CamScanner. Page 2. Scanned by CamScanner.

Chapter 9-MySQL-Advanced.pdf
One of the major responsibility of a DBMS is to maintain the. Integrity of the data ... or checks applicable to a column or table which ensures the. integrity or ... 5 PRIMARY KEY Used to identify a row uniquely. ... Chapter 9-MySQL-Advanced.pdf.

Chapter 9. Alloys 9.1 Iron and Steel
American Iron and Steel Industry – Society for Automotive Engineers. • Mn enhances strength (0.3-0.95%). • Low C content plain-carbon steels have low strength ...

Chapter 9 Unpacking the Trunk: Using Basic Research ...
While the research tools may exist for answering these types of questions (e.g., Cooper & Mason 2001), the practical application of these tools to species such ..... as obesity (Abate 2000) and chronic stress (Drolet, Beaulieu, Mansi, Champagne et al

9 CHAPTER 2 ANTENNA FUNDAMENTALS In this ... - Educypedia
For practical applications, a VSWR of 2 is acceptable, since this .... The monopole is very useful in mobile antennas where the conducting plane can be the car ...

Chapter 9 Review Understanding Concepts Applying ...
This means that it takes an impulse of greater intensity to activate these sensory neurons, hence, the person tends not to feel pain as easily. 3. Neuron X is an excitatory neuron. Its neuron transmitter causes the depolarization of neuron Y, making

Chapter 9 - Expanding Economic Opportunities in Industry and ...
Chapter 9 - Expanding Economic Opportunities in Industry and Services through Trabaho and Negosyo.pdf. Chapter 9 - Expanding Economic Opportunities in ...