1. Deadlock Detection in a single-instance resource system uses:
Correct Answer: b) Resource-Allocation Graph (RAG) with cycles
Explanation: For systems with single instances of each resource type, a cycle in the Resource-Allocation Graph indicates deadlock. The Banker's Algorithm is used for multiple-instance systems.
2. Which method is used for deadlock detection in multiple-instance resource systems?
Correct Answer: a) Banker's Algorithm
Explanation: The Banker's Algorithm is used for deadlock detection in systems with multiple instances of resource types by checking if the system is in a safe state.
3. Deadlock Recovery techniques include:
Correct Answer: a) Process termination & Resource preemption
Explanation: Deadlock recovery involves either: (1) Process termination (aborting one or more processes) or (2) Resource preemption (taking resources from processes to break deadlock).
4. In deadlock recovery, a victim process is selected based on:
Correct Answer: a) Priority, CPU usage, and time consumed
Explanation: The victim selection considers factors like: process priority (lower first), CPU time consumed (less first), resources held (fewer first), and restartability (easier to restart first).
5. Starvation occurs when:
Correct Answer: a) A process waits indefinitely for a resource
Explanation: Starvation happens when a process is perpetually denied necessary resources due to other processes always being allocated instead, causing indefinite waiting.
6. A technique to prevent starvation is:
Correct Answer: a) Aging (gradually increasing priority of waiting processes)
Explanation: Aging prevents starvation by gradually increasing the priority of processes that have been waiting long, ensuring they eventually get resources.
7. Starvation differs from deadlock because:
Correct Answer: a) Starvation involves indefinite waiting, while deadlock involves circular waiting
Explanation: Key difference: Deadlock involves a circular wait where processes block each other, while starvation is one process being perpetually denied resources despite resources becoming available.
8. Which scheduling policy can lead to starvation?
Correct Answer: d) Priority Scheduling
Explanation: Priority Scheduling can cause starvation if lower-priority processes are never given CPU time due to continuous arrival of higher-priority processes (unless aging is implemented).