Practice
Solution
Step 1: Identify circular wait
Each process holds a resource and waits for another held by the next process, forming a cycle.Step 2: Understand consequences
Because each process waits for a resource held by another in the cycle, none can proceed, causing indefinite waiting.Step 3: Analyze other options
One process releases its resource voluntarily, breaking the cycle immediately assumes voluntary release, which is not guaranteed. The operating system preempts resources from one process to resolve the wait involves preemption, which is not part of the circular wait condition. Processes detect the cycle and terminate themselves automatically assumes automatic termination, which is not standard behavior.Final Answer:
Option A -> Option AQuick Check:
Circular wait leads to indefinite blocking without external intervention.
- Assuming processes will release resources voluntarily
- Confusing circular wait with preemption or automatic recovery
Solution
Step 1: Understand SSTF's goal
SSTF selects the closest request to the current head position to minimize seek time.Step 2: Consider starvation risk
SSTF can cause starvation for requests far from the current head position because it always picks the nearest request.Step 3: Compare with SCAN and C-SCAN
SCAN and C-SCAN move the head in a fixed direction to provide fairness and avoid starvation, sacrificing some seek time efficiency.Final Answer:
Option A -> Option AQuick Check:
When minimizing average seek time is the highest priority and starvation is acceptable correctly identifies SSTF's strength and its tradeoff with starvation risk.
- Assuming SSTF always avoids starvation
- Believing SCAN/C-SCAN minimize seek time better than SSTF
- Confusing uniform distribution with SSTF suitability
Solution
Step 1: Understand FCFS characteristics
FCFS schedules processes in the order they arrive without preemption, making it simple and fair in terms of arrival order.Step 2: Analyze each option
A is incorrect because FCFS does not optimize for similar burst times; it just queues by arrival.
B is incorrect because FCFS can cause long waiting times if a long process arrives first.
C is incorrect because FCFS is non-preemptive and does not handle unpredictable arrivals well.
D is correct because FCFS's main advantage is simplicity and fairness in order, not responsiveness or waiting time optimization.Final Answer:
Option D -> Option DQuick Check:
FCFS is chosen for simplicity and fairness, not for minimizing waiting time or handling preemption.
- Assuming FCFS minimizes average waiting time
- Confusing FCFS with preemptive scheduling
- Believing FCFS handles unpredictable arrivals efficiently
Solution
Step 1: Identify what happens when working set is exceeded
The process causes frequent page faults because its active pages exceed allocated frames.Step 2: OS response
The OS attempts to swap out pages not in the working set to free frames, but if frames are insufficient, thrashing persists.Step 3: Analyze options
A is incorrect because OS cannot always increase frames immediately; thrashing may continue.
B is correct as it describes the OS swapping out pages but thrashing continuing due to frame shortage.
C is incorrect because OS does not ignore page faults.
D is incorrect because load control (reducing processes) is a prevention technique but not an immediate response to page faults.Final Answer:
Option B -> Option BQuick Check:
Thrashing occurs when working set exceeds frames; OS tries to swap but may fail if frames are insufficient.
- Assuming OS can instantly allocate more frames
- Believing OS ignores page faults
- Confusing immediate load control with page fault handling
Solution
Step 1: Analyze LRU Implementation Complexity
LRU needs to track the order of page usage, which is costly without hardware or data structures.Step 2: Evaluate Each Option
LRU requires hardware support or additional data structures to track usage efficiently is true; LRU requires hardware support or additional data structures to track usage efficiently.
LRU can be implemented with O(1) time complexity per page reference using a stack is false; a stack alone cannot provide O(1) updates on every reference.
LRU always performs better than FIFO regardless of workload is false; LRU can perform worse than FIFO in some workloads (e.g., scan patterns).
LRU does not require any extra space beyond the page frames is false; LRU requires extra space for tracking usage metadata.Final Answer:
Option A -> Option AQuick Check:
Efficient LRU needs support beyond just frames.
- Assuming LRU is always better than FIFO
- Believing LRU can be done with no extra space
- Thinking a simple stack suffices for O(1) LRU
