5.CPU_Scheduling - CPU Scheduling Mehdi Kargahi School of...

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

View Full Document Right Arrow Icon
CPU Scheduling Mehdi Kargahi School of ECE University of Tehran Spring 2008
Background image of page 1

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

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) CPU and I/O Bursts
Background image of page 2
M. Kargahi (School of ECE) Histogram of CPU-Burst Durations
Background image of page 3

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

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) When CPU Scheduling Occurs 1. Running process switches to wait state s I/O request s Waiting for termination of one of the child processes 2. Running process switches to ready state (timer interrupt) 3. Waiting process switches to ready state (I/O completion) 4. Running process terminates Under non-preemptive scheduling: 1 and 4 are legal scheduling points Under preemptive scheduling: 1 through 4 are legal Scheduling points
Background image of page 4
M. Kargahi (School of ECE) Preemptive Scheduling s Inconsistency of shared data should be controlled s During the processing of a system call or doing I/O, preemption may result inconsistency s Most kernel codes are non-preemptive s These portions of code with disabled interrupts do not occur very often and typically contain few instructions s Problematic for real-time systems s Linux RedHat 2.6 kernel is preemptable
Background image of page 5

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

View Full DocumentRight Arrow Icon
M. Kargahi (School of ECE) Dispatcher s The dispatcher function includes s Switching context s Switching to user mode s Jumping to the proper location in the user program to restart that program s Dispatch latency must be short
Background image of page 6
M. Kargahi (School of ECE) Scheduling Criteria s Some criteria for selecting an scheduling algorithm are as follows: 1. CPU utilization
Background image of page 7

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

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

Page1 / 24

5.CPU_Scheduling - CPU Scheduling Mehdi Kargahi School of...

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

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