Practice
Solution
Step 1: Identify head direction and requests
Head at 15 moving up; requests: 2, 10, 20, 22, 40.Step 2: SCAN moves towards higher tracks first
It services requests in ascending order from current position: 20, 22, 40.Step 3: After reaching the highest request, SCAN reverses direction
Then it services remaining requests in descending order: 10, 2.Final Answer:
Option C -> Option CQuick Check:
20, 22, 40, 10, 2 correctly reflects SCAN's elevator movement servicing requests in one direction then reversing.
- Assuming SCAN skips requests on the return trip
- Mixing up order of requests on the return trip
- Confusing SCAN with C-SCAN which only moves in one direction
Solution
Step 1: Understand the role of directory entries in file name resolution
Directory entries map file names to inode numbers, acting as the bridge between human-readable names and inode metadata.Step 2: Clarify inode responsibilities
Inodes store metadata and pointers to data blocks but do not contain file names.Step 3: Differentiate superblock and data blocks
The superblock manages file system-wide metadata, not individual file mappings; data blocks store file content, not names.Final Answer:
Option D -> Option DQuick Check:
Directory entries handle name-to-inode mapping [OK]
- Confusing inode as containing file names
- Assuming data blocks store file names
- Believing superblock handles file name mappings
Solution
Step 1: Review privilege separation
User mode is restricted; kernel mode has full privileges.Step 2: Validate each statement
User mode code cannot directly access kernel memory for protection reasons. is true; user mode cannot access kernel memory. Kernel mode has unrestricted access to all hardware and memory. is true; kernel mode has full access. Mode switches are triggered by traps or interrupts to ensure controlled privilege escalation. is true; traps/interrupts cause mode switches.Step 3: Identify incorrect statement
System calls execute entirely in user mode without switching to kernel mode. is false; system calls require switching to kernel mode to execute privileged operations.Final Answer:
Option D -> Option DQuick Check:
System calls always involve mode switch to kernel [OK]
- Believing system calls run entirely in user mode
- Confusing hardware interrupts with system calls
- Assuming user mode can access kernel memory
Solution
Step 1: Identify internal fragmentation cause
Buddy system rounds allocations to power-of-two sizes, causing internal fragmentation.Step 2: Evaluate strategies
Slab allocator efficiently manages fixed-size objects, reducing internal fragmentation without slowing allocation.Step 3: Analyze other options
Increasing minimum block size (A) increases internal fragmentation; compaction (C) addresses external fragmentation; fixed partitioning (D) is inflexible and can worsen fragmentation.Final Answer:
Option C -> Option CQuick Check:
Slab allocators complement buddy system to reduce internal fragmentation [OK]
- Thinking compaction reduces internal fragmentation
- Assuming bigger minimum block size reduces fragmentation
- Believing fixed partitioning eliminates fragmentation
Solution
Step 1: Understand burst time estimation impact
Estimations can be inaccurate, causing the scheduler to preempt based on wrong assumptions.Step 2: Analyze consequences
Frequent unnecessary preemptions increase overhead and reduce efficiency.Step 3: Why other options are incorrect
B: Scheduler won't always pick wrong process; estimates can be close.
C: Non-preemptive scheduling is a design choice, not forced by estimation.
D: Starvation is not eliminated by estimates; it depends on scheduling policy.Final Answer:
Option A -> Option AQuick Check:
Estimation errors cause scheduling inefficiency via unnecessary preemptions.
- Assuming estimates always cause wrong scheduling
- Believing estimation removes starvation
