ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL 800 0 1

advertisement
Review Questions on
Chapter III—Scheduling
COSC 4330/6310
Summer 2013
First Question

In the Round Robin policy, what the
advantages and disadvantages of
selecting a small time quantum?
(2×5 points)
First Question

In the Round Robin policy, what the
advantages and disadvantages of
selecting a small time quantum?
(2×5 points)

The main advantage of small time
slices is a faster response time for
interactive requests
First Question

In the Round Robin policy, what the
advantages and disadvantages of
selecting a small time quantum?
(2×5 points)

The main advantage of small time
slices is a faster response time for
interactive requests

Their main disadvantage is too much
CPU time taken by context switches
Second Question

Consider the following set of parameters
for a System V Release 4 scheduler with
four priority levels:
#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL
800
X
1
1000
1
# 0
400
0
2
1000
2
# 1
200
1
3
200
3
# 2
100
2
Y
200
3
# 3

Which are the sole reasonable values for
X and Y?
• X=__ and Y= __
Second Question

Consider the following set of parameters
for a System V Release 4 scheduler with
four priority levels:
#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL
800
X
1
1000
1
# 0
400
0
2
1000
2
# 1
200
1
3
200
3
# 2
100
2
Y
200
3
# 3

Which are the sole reasonable values for
X and Y?
• X=_0_ and Y= __
Second Question

Consider the following set of parameters
for a System V Release 4 scheduler with
four priority levels:
#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL
800
X
1
1000
1
# 0
400
0
2
1000
2
# 1
200
1
3
200
3
# 2
100
2
Y
200
3
# 3

Which are the sole reasonable values for
X and Y?
• X=_0_ and Y= _3_
Third Question

Consider the following System V
Release 4 scheduler:
#ts_quantum
800
400
200
100

ts_tqexp
0
0
2
2
ts_slpret ts_maxwait ts_lwait
1
16000
0
2
8000
2
3
4000
3
4
2000
4
and identify the four incorrect
parameters: (4×5 points)
LVL
# 0
# 1
# 2
# 3
Third Question

Consider the following System V
Release 4 scheduler:
#ts_quantum ts_tqexp ts_slpret ts_maxwait ts_lwait LVL
800
0
1
16000
0
# 0
400
0
2
8000
2
# 1
200
2
3
4000
3
# 2
100
2
4
2000
4
# 3

and identify the four incorrect
parameters: (4×5 points)
Third Question

Consider the following System V
Release 4 scheduler:
#ts_quantum
800
400
200
100

ts_tqexp
0
0
2
2
ts_slpret ts_maxwait ts_lwait
1
16000
0
2
8000
2
3
4000
3
4
2000
4
and identify the four incorrect
parameters: (4×5 points)
LVL
# 0
# 1
# 2
# 3
Third Question

Consider the following System V
Release 4 scheduler:
#ts_quantum
800
400
200
100

ts_tqexp
0
0
2
2
ts_slpret ts_maxwait ts_lwait
1
16000
0
2
8000
2
3
4000
3
4
2000
4
and identify the four incorrect
parameters: (4×5 points)
LVL
# 0
# 1
# 2
# 3
Third Question

Consider the following System V
Release 4 scheduler:
#ts_quantum
800
400
200
100

ts_tqexp
0
0
2
2
ts_slpret ts_maxwait ts_lwait
1
16000
0
2
8000
2
3
4000
3
4
2000
4
and identify the four incorrect
parameters: (4×5 points)
LVL
# 0
# 1
# 2
# 3
Fourth Question
Consider the following System V
Release 4 scheduler: (3×5 points)

#ts_quantum
1000
500
200
100


ts_tqexp
0
1
1
2
ts_slpret ts_maxwait ts_lwait LVL
1
16000
1
# 0
2
8000
2
# 1
3
4000
3
# 2
3
2000
3
# 3
Which events can increase the priority
of a process at level 2?
Which events can lower it?
Fourth Question
Consider the following System V
Release 4 scheduler: (3×5 points)

#ts_quantum
1000
500
200
100

ts_tqexp
0
1
1
2
ts_slpret ts_maxwait ts_lwait LVL
1
16000
1
# 0
2
8000
2
# 1
3
4000
3
# 2
3
2000
3
# 3
A return from the wait state or a long
wait in the ready queue will increase
the priority of a process
Fourth Question
Consider the following System V
Release 4 scheduler: (3×5 points)

#ts_quantum
1000
500
200
100


ts_tqexp
0
1
1
2
ts_slpret ts_maxwait ts_lwait LVL
1
16000
1
# 0
2
8000
2
# 1
3
4000
3
# 2
3
2000
3
# 3
A return from the wait state or a long
wait in the ready queue will increase
the priority of a process
A CPU timer interrupt will decrease it
Short Questions

What is the major limitation of the roundrobin scheduling policy?
Short Questions
What is the major limitation of the roundrobin scheduling policy?


RR cannot provide at the same time a
good interactive response time and a
good throughput at medium to heavy
load
Short Questions

What is the main advantage of
preemptive schedulers over nonpreemptive ones?
Short Questions
What is the main advantage of
preemptive schedulers over nonpreemptive ones?


Scheduler can take CPU way from
processes "monopolizing" the CPU
• Other processes do not have to wait
as long
Short Questions

What do schedulers typically do to
increase the priorities of I/O-bound
processes?
Short Questions
What do schedulers typically do to
increase the priorities of I/O-bound
processes?


They increase the priorities of
processes returning to the ready
queue from the wait state
• Very likely to have performed an I/O
Short Questions

What do schedulers typically do to lower
the priorities of CPU-bound processes?
Short Questions
What do schedulers typically do to lower
the priorities of CPU-bound processes?


They decrease the priority of
processes who have been preempted
because they have exhausted their
CPU time slice
True or False

The Round-Robin scheduling algorithm
does not differentiate between CPUbound and I/O-bound processes.
True or False
The Round-Robin scheduling algorithm
does not differentiate between CPUbound and I/O-bound processes.


TRUE because all processes have the
same priority
True or False

The Round-Robin scheduling algorithm
is starvation-free.
True or False
The Round-Robin scheduling algorithm
is starvation-free.


TRUE because all processes have the
same priority
True or False

Most schedulers adjust the priorities of
real-time processes in order to give
each process its fair share of the CPU.
True or False
Most schedulers adjust the priorities of
real-time processes in order to give
each process its fair share of the CPU.


FALSE, the schedulers we have
discussed assign fixed priorities to
real-time processes
True or False

Steps taken to decrease the response
time of a system can sometimes
decrease its throughput.
True or False
Steps taken to decrease the response
time of a system can sometimes
decrease its throughput.


TRUE, think of the round-robin policy
True or False

All preemptive policies have multiple
priority levels.
True or False
All preemptive policies have multiple
priority levels.


TRUE, think of the round-robin policy
True or False

The throughput of a computer using a
round-robin scheduling policy often goes
down when the number of users goes
up.
True or False
The throughput of a computer using a
round-robin scheduling policy often goes
down when the number of users goes
up. .


TRUE because the context switch
overhead is likely to increase
Download