Practice Questions on Processes
CS 552 - Fall 1999
October 4, 1999
Prof. Matta
-
Solve the following problems from the textbook:
-
6.3 (page 168)
-
6.5 (page 169)
-
Implement the readers/writers problem using monitors. Explain the concept
of starvation using this problem as an example.
-
Consider the following synchronization primitives:
ADVANCE(A):
increments the variable A by 1.
AWAIT(A,
C): blocks the process executing this instruction until
A >= C.
Using these primitives, develop a solution to the bounded buffer problem
with (a) buffer size 1, and (b) buffer size n (n > 1).
-
A time-sharing system's scheduler uses predictive SJF as its scheduling
discipline. The predicted length of each process's next CPU burst is computed
as a moving average of that process's ten past bursts. You would like to
run a program that repeatedly performs extensive, lengthy computations
followed by output.
(a) What can happen to your job in this system?
(b) How can you "beat the system" to receive the best possible
service? Assume that you have no special capabilities or privileges unavailable
to other users.
-
Consider "n" processes sharing the CPU in a RR fashion. Assuming that each
process switch takes "s" seconds. What must be the quantum size "q"
such that the overhead resulting from process switching is minimized, but
at the same time, each process is guaranteed to get its turn at the CPU
at least every "t" seconds?
More questions may be added later ...
Last updated 10/6/99