Download presentation
Presentation is loading. Please wait.
1
CS 143A – Winter 2013 Quiz 2 Solutions
2
4. In a resource allocation graph, a directed edge from process Pi to resource type Rj means:
Pi has requested an instance of Rj Pi has requested all instances of Rj that are available None of the above 5. Let us consider two processes A and B and three resource types R, S, and T. Let us consider that process A requests resource types R, S, and T, and process B requests resource types R and S. If A gets assigned resource types R and T, and B gets assigned resource type S, then: A and B will be in deadlock There is no deadlock 6. Dynamic linking/loading is an example of delayed binding: a. True b. False 1. To get into a deadlock situation, we need to have: Mutual exclusion AND hold and wait AND no preemption AND circular wait Mutual exclusion AND preemption AND spooling everything AND ordering of resources numerically No preemption AND hold and wait AND ordering of resources numerically None of the above 2. Given a system where all shared resource types are numbered, if a process is ordering a resource of type N, it should not be holding a resource of type greater than or equal to N. This is a method for deadlock. Prevention Detection Recovery 3. Which of the following statements on resource allocation graphs is true: If there are no cycles, there is deadlock If there are cycles, there is deadlock If there are cycles, there is no deadlock
3
9. In First-Come, First-Served scheduling policy, I/O bound processes may have to wait long in the ready queue waiting for a CPU bound job to finish. This is known as a. Aging b. Priority inversion c. Priority inheritance d. Convoy effect e. None of the above 10. A process P tries to acquire a lock using the Test_and_Set instruction: while (Test_and_Set(lock)) do no-op; If the lock is busy (some other process has acquired it) and all interrupts are disabled, then a. process P blocks, waiting for the lock to be available b. process P wastes processor and memory cycles c. none of the above 7. In a certain system, N processes arrive at the CPU ready queue at the same time. Which of the following scheduling algorithms will give the minimum average turnaround time of these N processes? First-Come, First Served Round-Robin Shortest-Job-First None of the above 8.In the Banker's Algorithm, Need[i,j] + Allocation[i,j] = a. Available[i,j] b. Request[i,j] c. Max[i,j] d. None of the above
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.