Scheduling - PowerPoint PPT Presentation

About This Presentation
Title:

Scheduling

Description:

Scheduling Objectives Running Scheduling functions SCHEDULING POLICIES First-In-First-Out (FIFO) Scheduling Round-Robin (RR) Scheduling Quantum size: determines ... – PowerPoint PPT presentation

Number of Views:56
Avg rating:3.0/5.0
Slides: 15
Provided by: Dr658
Learn more at: http://home.ubalt.edu
Category:

less

Transcript and Presenter's Notes

Title: Scheduling


1
  • Scheduling

2
  • Objectives
  • Fairness
  • Maximize throughput
  • Maximize the number of users receiving acceptable
    response times
  • Minimize overhead
  • Balance resource use
  • Balance between response time and resource
    utilization
  • Avoid indefinite postponement
  • Enforce priorities
  • Give preference to processes holding critical
    resources

3
SCHEDULING LEVELS
  • Running

Ready
Blocked
Low-level (short-term)
Blocked, suspended
Ready, suspended
Medium-level (medium-term)
High-level (long-term)
New
Exit
4
  • Scheduling functions

High-level
job scheduling
determines which programs are admitted to the
system
Medium-level
swapping
page-in, page-out
Low-level
dispatching
which process to execute next
  • Preemptive vs non preemptive
  • Priorities

5
  • SCHEDULING POLICIES


FIFO
Round Robin
SPN (SPF)
SRT
HRRN
Feedback
Fair share
selection function
max w
constant, time quantum
min s
min s-e
max (ws)/s
minw, using queues
f base, CPU, GCPU
decision mode
Non preemptive
preemptive
Non preemptive
preemptive
Non preemptive
preemptive
preemptive
throughput
no emphasis
low if quantum too small
high
high
high
no emphasis
no emphasis
response time
high if large variance
good for short processes
good for short processes
good
good
no emphasis
no emphasis
overhead
minimum
low
can be high
can be high
can be high
can be high
can be high
effect
penalizes short and I/O bound
fair treatment
penalize long processes
penalize long processes
good balance
may favor I/O bound
favor highest priorities
starvation
No
No
Possible
Possible
No
Possible
No
require knowledge of process length
w time in the system e time executing s
total time required
6
First-In-First-Out (FIFO) Scheduling
7
Round-Robin (RR) Scheduling
  • Quantum size determines response time to
    interactive requests
  • Very large quantum size
  • Processes run for long periods
  • Degenerates to FIFO
  • Very small quantum size
  • System spends more time context switching than
    running processes
  • Middle-ground
  • Long enough for interactive processes to issue
    I/O request
  • Batch processes still get majority of processor
    time

8
Shortest-Process-First (SPF) Scheduling
  • Scheduler selects process with smallest time to
    finish
  • Lower average wait time than FIFO
  • Reduces the number of waiting processes
  • Potentially large variance in wait times
  • Nonpreemptive
  • Results in slow response times to arriving
    interactive requests
  • Relies on estimates of time-to-completion
  • Can be inaccurate or falsified
  • Unsuitable for use in modern interactive systems

9
Highest-Response-Ratio-Next (HRRN) Scheduling
  • HRRN scheduling
  • Improves upon SPF scheduling
  • Still nonpreemptive
  • Considers how long process has been waiting
  • Prevents indefinite postponement

10
Shortest-Remaining-Time (SRT) Scheduling
  • SRT scheduling
  • Preemptive version of SPF
  • Shorter arriving processes preempt a running
    process
  • Very large variance of response times long
    processes wait even longer than under SPF
  • Not always optimal
  • Short incoming process can preempt a running
    process that is near completion
  • Context-switching overhead can become significant

11
Multilevel Feedback Queues
  • Different processes have different needs
  • Short I/O-bound interactive processes should
    generally run before processor-bound batch
    processes
  • Behavior patterns not immediately obvious to the
    scheduler
  • Multilevel feedback queues
  • Arriving processes enter the highest-level queue
    and execute with higher priority than processes
    in lower queues
  • Long processes repeatedly descend into lower
    levels
  • Gives short processes and I/O-bound processes
    higher priority
  • Long processes will run when short and I/O-bound
    processes terminate
  • Processes in each queue are serviced using
    round-robin
  • Process entering a higher-level queue preempt
    running processes

12
Multilevel Feedback Queues
13
Fair Share Scheduling
  • FSS controls users access to system resources
  • Some user groups more important than others
  • Ensures that less important groups cannot
    monopolize resources
  • Unused resources distributed according to the
    proportion of resources each group has been
    allocated
  • Groups not meeting resource-utilization goals get
    higher priority

14
  • Multiprocessor scheduling
  • Types of multiprocessors
  • loosely coupled
  • functionally specialized
  • tightly coupled
  • Multiprocessors and parallelism (synchronization
    granularity)
  • Fine (in a single stream)
  • Medium (within a single application)
  • Coarse (concurrent processes in a system)
  • Very coarse (across network nodes)
  • Independent (unrelated processes)
Write a Comment
User Comments (0)
About PowerShow.com