CS604 Final Fall2006
CS604 Final Fall2006
StudentID/LoginID: ______________________________
Exam Date:
a. There is no choice.
3. Do not ask any questions about the contents of this examination from
anyone.
a. If you think that there is something wrong with any of the questions,
attempt it to the best of your understanding.
a. If you believe that two (or more) of the choices are the correct ones for
a particular question, choose the best one.
b. On the other hand, if you believe that all of the choices provided for a
particular question are the wrong ones, select the one that appears to
you as being the least wrong.
not be considered as errors. So try to only answer the question and put
your idea and
Segmented paging incurs less internal fragmentation than pure process-level paging.
► True
► False
► Ambiguous question
The Multi-Level Feedback Queue (MLFQ) scheduling algorithm is the same as Shortest-
Job-First.
► True
► False
► Ambiguous question
► True
► False
► Ambiguous question
Question No: 4 ( Marks: 2 ) - Please choose one
► True
► False
► Ambiguous question
► True
► False
► Ambiguous question
The following is a semaphore-based solution for the n-process critical section problem. Is it a
good solution? Explain your answer.
Question No: 7 ( Marks: 20 )
Suppose there are 2 copies of resource A, 3 copies of resource B, and 3 copies of resource C.
Suppose further that process 1 holds one unit of resources B and C and is waiting for a unit
of A; that process 2 is holding a unit of A and waiting on a unit of B; and that process 3 is
holding one unit of A, two units of B, and one unit of C. Draw the resource allocation graph.
Is the system in a deadlocked state? Why or why not?
(a) Given the following snapshot of a system, determine whether or not the system is in a safe
state.
SHOW YOUR WORK justifying your answer. (Use Banker’s algorithm)
Process Maximum need Current Available
ID allocation
R1 R2 R3 R1 R2 R3 R1 R2 R3
P1 3 2 3 2 2 2 1 1 2
P2 1 3 2 0 1 2
P3 4 4 4 0 2 2
P4 1 6 1 1 0 1
(b) Given the following resource-allocation state of a system at time T0, determine whether
or not the system is in deadlock at T0. Justify your answer.