Questions On Proportional Share Thread Scheduling

ADVERTISEMENT

CS 3430/5430
Lecture 5
Name:_____________
1) Decay usage schedulers (e.g., Mac OS X / MS Windows) dynamically adjust
priorities of waiting threads higher, and running threads lower.
Mac OS X
Thread priority:
“base priority” - recent usage
When adjust priorities?
when a thread changes state
Adjust running thread usage by:
old usage + current burst * current load
n
Adjust waiting thread usage by:
old usage * (5/8)
, where n is # of 1/8 sec.
“exponential decay”
a) Why are priorities updated when a thread changes state and not continually?
b) The values (5/8) and 1/8 sec. are empirical parameter defaults that can be
tuned by the system administrator.
What would be the general effect of increasing from (5/8) to (7/8)?
What would be the general effect of decreasing from 1/8 second to 1/16 second?
c) In Microsoft Windows, a thread coming out of a wait state has its priority elevated from the base priority
depending on what it was waiting. Why would waiting on a disk be a small boost, but waiting on input from the
keyboard be a large boost?
d) In Microsoft Windows, a thread using the processor has its priority reduced linearly downward toward the
base priority. To avoid starving a runnable thread with base priority, it periodically boosts the priority of any
thread not dispatched otherwise. Why does the Mac OS X scheduler not have a similar starvation problem?
2. Proportional-Share scheduling - allow the user (or system) to specify the proportion of CPU time each thread
should be allocated. Three main types of proportional-share scheduling:
a) weighted round-robin scheduling (WRR) - round-robin so threads with higher weights getting longer-time
slices
Consider three threads we want to run with the following proportions. If we want to run all three in 32 ms, how
big of time slices would each be allocated?
Thread
Proportion of CPU
CPU Time-Slice (ms)
T1
4
T2
3
T3
1
Draw the Gantt chart for this schedule
Lecture 5 Page 1

ADVERTISEMENT

00 votes

Related Articles

Related forms

Related Categories

Parent category: Education
Go
Page of 2