part7 - CS354: Operating Systems Spring 2012 Part 7:...

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

View Full Document Right Arrow Icon
1 CS354: Operating Systems Spring 2012 Part 7: General Process Scheduling Dongyan Xu Department of Computer Science Purdue University
Background image of page 1

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

View Full DocumentRight Arrow Icon
Process Scheduling From the user’s point of view, an OS allows running multiple processes simultaneously. In reality, the CPU executes one process after another to give the illusion that multiple processes run simultaneously. The Process Scheduler is the OS subsystem that selects one process after the other and decides what process to run next. A Context Switch is the procedure used by the OS to switch from one process to another
Background image of page 2
Types of Scheduling There are two types of process scheduling policies: Non Preemptive Scheduling Preemptive Scheduling
Background image of page 3

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

View Full DocumentRight Arrow Icon
Non Preemptive Scheduling In Non Preemptive Scheduling a context switch (switch from one process to another) happens only when the running process goes to a waiting state or when the process gives up the CPU voluntarily. The main problem of Non Preemptive Scheduling is that a misbehaved process that loops forever may hold the CPU and prevent other processes from running. Is Xinu scheduler preemptive or non-preemptive?
Background image of page 4
Preemptive Scheduling In Preemptive Scheduling a context switch happens periodically ( every 1/100sec or quantum time) as a result of a timer interrupt. A timer interrupt will cause a context switch , that is, the running process to go to ready state and the process that has been the longest in ready state will go to current state. Preemptive scheduling is implemented in UNIX, and Windows 95 and above.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Advantages/Disadvantages of Non Preemptive Scheduling Advantages of Non-Preemptive Scheduling : More control on how the CPU is used. Simple to implement.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/23/2012 for the course HORT 217 taught by Professor Staff during the Fall '08 term at Purdue University-West Lafayette.

Page1 / 22

part7 - CS354: Operating Systems Spring 2012 Part 7:...

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

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