Practice
Solution
Step 1: Identify external fragmentation effect
External fragmentation means free memory is split into small noncontiguous blocks.Step 2: Understand system response
Compaction rearranges memory to create larger contiguous free blocks, enabling allocation.Step 3: Evaluate other options
Immediate rejection (B) ignores compaction; buddy system merges only buddies, not all blocks (C); internal fragmentation (D) is unrelated to external fragmentation.Final Answer:
Option D -> Option DQuick Check:
Compaction is the standard response to external fragmentation [OK]
- Assuming buddy system merges all free blocks automatically
- Believing internal fragmentation can solve external fragmentation
- Thinking system rejects requests without compaction
Solution
Step 1: Verify saving CPU state
Saving CPU state to PCB is true and essential for context switching.Step 2: Scheduler role
The scheduler decides which process runs next but does not perform register saving/restoring; this is done by the OS kernel and hardware mechanisms.Step 3: Triggers for context switch
Interrupts and system calls can trigger context switches, so this is correct.Step 4: Overhead of frequent switches
Frequent context switches increase overhead and reduce throughput, which is true.Final Answer:
Option B -> Option BQuick Check:
Scheduler does not directly save/restore registers; it manages process selection.
- Assuming scheduler handles register saving
- Confusing triggers of context switch
- Underestimating overhead of frequent switches
Solution
Step 1: Define turnaround time
Turnaround time = completion time - arrival time, always ≥ CPU burst time.Step 2: Analyze each option
Turnaround time includes both waiting time and execution time of a process is correct; turnaround time includes waiting and execution. Turnaround time is the total time from process submission to completion is correct by definition. Turnaround time depends on the time quantum size and the number of processes in the ready queue is correct; quantum size and queue length affect waiting and thus turnaround time. Turnaround time can be less than the CPU burst time if the quantum is large is incorrect because turnaround time cannot be less than CPU burst time regardless of quantum size.Final Answer:
Option C -> Option CQuick Check:
Turnaround time ≥ CPU burst time always.
- Confusing turnaround time with waiting time
- Thinking large quantum can reduce turnaround below burst time
- Ignoring impact of queue length on turnaround
Solution
Step 1: Understand starvation in preemptive SJF
Shorter jobs can continuously preempt longer ones, causing longer processes to wait indefinitely.Step 2: Analyze other options
A: While context switches increase, CPU utilization remains high; overhead is a concern but not utilization.
B: Preemptive SJF generally reduces average turnaround time, not increases it.
D: Preemptive SJF is designed to handle processes arriving at different times.Final Answer:
Option B -> Option BQuick Check:
Starvation is a classic drawback of preemptive SJF.
- Confusing turnaround time impact
- Assuming preemptive SJF cannot handle dynamic arrivals
Solution
Step 1: Understand TLB size impact
Larger TLB can cache more translations, increasing hit rate.Step 2: Consider trade-offs
However, larger TLBs have longer lookup times and consume more power and chip area.Step 3: Analyze options
A: Correct, bigger TLBs have diminishing returns and increased latency.
B: Incorrect, increasing size does not always reduce access time without downsides.
C: Incorrect, larger TLBs increase power and area.
D: Incorrect, page tables remain necessary for full address translation.Final Answer:
Option D -> Option DQuick Check:
Trade-offs include lookup latency and hardware cost, not just hit rate.
- Assuming bigger TLB is always better
- Ignoring hardware cost and latency
