OS_ch05u_F07 - I-C Lin Assistant Professor Textbook...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon
I.-C. Lin, Assistant Professor. Textbook: Operating System Principles 7ed HAPTER 5 PROCESS CHEDULING CHAPTER 5: PROCESS SCHEDULING
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
hapter 5: Process Scheduling Chapter 5: ± Basic Concepts ± Scheduling Criteria ± Scheduling Algorithms lti l S h d l i ± Multiple-Processor Scheduling ± Thread Scheduling ± Operating Systems Examples lgorithm Evaluation ± Algorithm Evaluation
Background image of page 2
asic Concepts Basic Concepts aximum CPU utilization obtained with multiprogramming ± Maximum CPU utilization obtained with multiprogramming PU O B t C l t i i t f l ± CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait ± CPU burst distribution
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Alternating Sequence of CPU And I/O Bursts
Background image of page 4
istogram of CPU- urst Times Histogram of CPU burst Times
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
PU Scheduler CPU Scheduler l t f th i th t d t ± Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them ± CPU scheduling decisions may take place when a process: witches from running to waiting state 1. Switches from running to waiting state 2. Switches from running to ready state 3. Switches from waiting to ready gy 4. Terminates ± Scheduling under 1 and 4 is nonpreemptive ± All other scheduling is preemptive
Background image of page 6
ispatcher Dispatcher ispatcher module gives control of the CPU to the process ± Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; this 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
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
cheduling Criteria Scheduling Criteria PU utilization ± CPU utilization ± keep the CPU as busy as possible roughput ± Throughput ± # of processes that complete their execution per time unit rnaround time ± Turnaround time ± amount of time to execute a particular process aiting time ± Waiting time ± amount of time a process has been waiting in the ready queue esponse time ± 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)
Background image of page 8
ptimization Criteria Optimization Criteria ax CPU utilization ± Max CPU utilization ax throughput ± Max throughput ± Min turnaround time ± Min waiting time ± Min response time
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
rst ome First erved (FCFS) Scheduling First-Come, First-Served (FCFS) Scheduling rocess urst Time 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 e Gantt Chart for the schedule is: The Gantt Chart for the schedule is: P 1 P 2 P 3 24 27 30 0 ± Waiting time for P 1 = 0; P 2 = 24; P 3 = 27 ± Average waiting time: (0 + 24 + 27)/3 = 17
Background image of page 10
FS Scheduling (Cont.) FCFS Scheduling (Cont.) uppose that the processes arrive in the order Suppose that the processes arrive in the order P 2 , P 3 , P 1 e Gantt chart for the schedule is: ± The Gantt chart for the schedule is: P 1 P 3 P 2 6 33 0 0 ± Waiting time for P 1 = 6 ;P 2 = 0 ; P 3 = 3 ±
Background image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 12
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/29/2009 for the course INFO ENGI 9801 taught by Professor Wu during the Spring '09 term at 東京国際大学.

Page1 / 47

OS_ch05u_F07 - I-C Lin Assistant Professor Textbook...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online