{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


05_CPU_Scheduling_I - CSC 4103 Operating Systems Fall 2009...

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

View Full Document Right Arrow Icon
CSC 4103 - Operating Systems Fall 2009 Tevfik Ko ! ar Louisiana State University September 10th, 2009 Lecture - V CPU Scheduling - I 2 Roadmap CPU Scheduling Basic Concepts Scheduling Criteria & Metrics Different Scheduling Algorithms • FCFS • SJF • Priority • RR 3 Basic Concepts Multiprogramming is needed for efficient CPU utilization CPU Scheduling: deciding which processes to execute when Process execution begins with a CPU burst , followed by an I/O burst CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait 4 Alternating Sequence of CPU And I/O Bursts 5 Histogram of CPU-burst Durations 6 Process State As a process executes, it changes state new : The process is being created ready : The process is waiting to be assigned to a process running : Instructions are being executed waiting : The process is waiting for some event to occur terminated : The process has finished execution
Background image of page 1

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

View Full Document Right Arrow Icon
7 CPU Scheduler Selects from among the processes in memory that are ready to execute, and allocates the CPU to one of them ! short-term scheduler CPU scheduling decisions may take place when a process: 1. Switches from running to waiting state 2. Switches from running to ready state 3. Switches from waiting to ready 4. Terminates Scheduling under 1 and 4 is nonpreemptive/cooperative Once a process gets the CPU, keeps it until termination/switching to waiting state/release of the CPU All other scheduling is preemptive Most OS use this Cost associated with access to shared data i.e. time quota expires 8 Dispatcher Dispatcher module gives control of the CPU to the process selected by the short-term scheduler; Its function 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 9 Scheduling Criteria CPU utilization – keep the CPU as busy as possible --> maximize Throughput – # of processes that complete their execution per time unit --> maximize Turnaround time
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}