CS345 09 - Scheduling

CS345 09 - Scheduling - Chapter 9 - Scheduling I want a...

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

View Full Document Right Arrow Icon
Chapter 9 - Scheduling I want a turn. Now!
Background image of page 1

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

View Full DocumentRight Arrow Icon
BYU CS 345 Scheduling 2 Topics to Cover… Scheduling Priorities Preemption Response Time Algorithms Topics
Background image of page 2
BYU CS 345 Scheduling 3 CPU Scheduling Fundamentally, scheduling is a matter of managing queues to minimize queuing delay and to optimize performance in a queuing environment . Scheduling needs to meet system objectives, such as: minimize response time maximize throughput maximize processor efficiency support multiprogramming Scheduling is central to OS design 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
BYU CS 345 Scheduling 4 Switching is Expensive Switching is Expensive Process A Process B Kernel Switch to Kernel Memory Reset MMU Pick a process Store Process State Process B Process A Load Process State Switch to User
Background image of page 4
BYU CS 345 Scheduling 5 Overhead Overhead Direct Cost : time to actually switch Indirect Cost : performance hit from memory (dirty cache, swapped out pages, etc.) Processes are dependent on I/O dependency level varies Process cycle compute wait for I/O Process execution is characterized by length of CPU burst number of bursts Burst Duration (milliseconds) 0 8 16 Frequency 160 140 120 100 80 60 40 20 Most processes have a large number of short CPU bursts
Background image of page 5

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

View Full DocumentRight Arrow Icon
BYU CS 345 Scheduling 6 When to Schedule? When to Schedule? Process creation Process exit Process blocks I/O Interrupt Non-preemptive: wait until exit or block Preemptive: interrupt if necessary Compute-bound I/O-bound
Background image of page 6
BYU CS 345 Scheduling 7 Different Needs Different Needs Batch: no terminal users payroll, inventory, interest calculation, etc. Interactive: lots-of-I/O from users Real-time: process must run and complete on time Typically real-time only runs processes specific to the application at hand General Purpose (clueless)
Background image of page 7

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

View Full DocumentRight Arrow Icon
BYU CS 345 Scheduling 8 Type of Scheduling Long-term performed when new process is created the more processes created, the smaller the percentage of time for each process keep a mix of processor-bound and I/O-bound Medium-term swapping to maintain a degree of multiprogramming memory management an issue (virtual memory) Short-term which ready process to execute next – dispatcher due to clock interrupts, I/O interrupts, system calls, signals Scheduling
Background image of page 8
BYU CS 345 Scheduling 9 Queuing Diagram for Scheduling Queuing Diagram for Scheduling Medium-term scheduling Medium-term scheduling Short-term scheduling Blocked Queue Event Occurs Event Wait Processor Batch jobs Time-out Ready Queue Release Ready, Suspend Queue Blocked, Suspend Queue Long-term scheduling Interactive users Scheduling
Background image of page 9

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

View Full DocumentRight Arrow Icon
BYU CS 345 Scheduling 10 Goals Goals All Systems  Fairness  Policy Enforcement  Balance Batch Systems  Throughput  Turnaround time  CPU utilization Interactive Systems  Response time  Proportionality Real-time Systems  Meeting deadlines  Predictability
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 93

CS345 09 - Scheduling - Chapter 9 - Scheduling I want a...

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

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