
Test 2: Supplementary
Operating Systems and Networking
CS330
Spring 2007
Answer any five questions from below
Date: March 30, 2007
Time: 2 hours.
Policy: Open book, open notes.
1. Suppose that a multiprogrammed system has a load of N processes with individual total
execution time of
. How would it be possible that the execution time could be
as small as maximum(
)? How would it be possible that the execution time is
greater than
?
2. Assume you have on an average n processes in the system and you are using RR scheduling with
time-quantum D units of time. It is assumed that in your system the average context switching
time is C. One could design a performance index for your system in terms of user-satisfaction U
where U could be measured as
U = D/R
where R is the average residence time of jobs in the system. (a) Obtain U in terms of the
parameters given so far. (b) What happens to U when C is infinitely large? (c) When very small?
3. Placement strategies determine where in the main storage incoming programs and data should be
loaded. Suppose a job waiting to begin execution has a storage requirement that can be fulfilled
immediately. Should the job be loaded and begin execution immediately? State your rationale.
4. One pessimistic Operating Systems designer claims that (a) the equilibrium performance of a
system is ultimately invariant of the specific storage allocation scheme (like First Fit, Worst Fit,
etc.) adopted, and (b) the First-fit strategy, notwithstanding its fancy name, is nothing more than a
random storage placement strategy. Comment on them.
5. Why is it easier to communicate between threads in a process than between processes? Why is it
more expensive to context switch in a process domain compared to context switching in thread-
domain?
6. What is the distinction between "deadlock" and "starvation"? Could a process "starve" even
though it does get the CPU periodically? Rationalize your answer.
7. A system has four processes and five different types of allocatable resources. The current
allocation and maximum needs are as follows:
Current allocation Maximum needs Available
Process A 1 0 2 1 1 1 1 2 1 3 0 0 x 1 1
Process B 2 0 1 1 0 2 2 2 1 0
Process C 1 1 0 1 0 2 1 3 1 0
Process D 1 1 1 1 0 1 1 2 2 1