CS FundamentalsHardGATE CS
Deadlock recovery by process termination: which criteria are sensible for choosing a victim? 1. Lowest priority 2. Least CPU time consumed so far 3. Fewest resources held 4. The process that most recently requested a resource
- A. Only 1
- B. Only 1 and 2
- C. All four can be used as cost factors
- D. Only 4
Correct answer: C. All four can be used as cost factors
Victim selection minimises cost: priority, work lost, resources that will be freed and how many more are needed, and rollback difficulty are all considered. The danger is starvation if the same process is always chosen, so the rollback count is also included.
More Operating Systems questions
- An OS uses the Banker's algorithm. Which assumption must hold for it to be applicable?
- Processes (arrival, burst): P1 (0, 6), P2 (1, 8), P3 (2, 7), P4 (3, 3). Under SRTF, what is the turnaround time of P2?
- Preemptive priority scheduling (smaller number = higher priority; equal priority is FCFS and does not preempt). Processes (arrival, burst…
- Five processes all arrive at time 0 in the order P1 (10), P2 (1), P3 (2), P4 (1), P5 (5) (bursts in ms). What is the average waiting time…
- Processes (arrival, burst): A (0, 3), B (2, 6), C (4, 4), D (6, 5), E (8, 2). By how much does SRTF reduce the average waiting time…
- Reference string: 2, 3, 2, 1, 5, 2, 4, 5, 3, 2, 5, 2, 3 frames, initially empty. What are the fault counts for FIFO, LRU and OPT?