CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which theoretical page-replacement algorithm gives the lowest possible page-fault rate by replacing the page used farthest in the future?
A. FIFO
B. Random only
C. FCFS
D. Optimal page replacement
Correct Answer: D
Optimal replacement requires future knowledge and is mainly a benchmark.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which page-replacement algorithm replaces the page that has not been used for the longest time?
A. LRU
B. FIFO
C. Optimal
D. FCFS
Correct Answer: A
LRU uses recent past behavior as a predictor of near-future references.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which page-replacement algorithm removes the page that has been in memory the longest regardless of recent use?
A. LFU only
B. FIFO
C. LRU
D. Optimal
Correct Answer: B
FIFO evicts the oldest loaded page and can exhibit Belady's anomaly.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Demand paging means pages are loaded into RAM:
A. Only when the computer shuts down
B. Only by the BIOS
C. When they are actually referenced
D. All at program installation time
Correct Answer: C
Demand paging loads pages on first use rather than preloading the entire address space.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
A page fault occurs when:
A. A disk sector is physically damaged
B. The CPU overheats
C. A file name is invalid
D. A referenced virtual page is not currently resident in physical memory
Correct Answer: D
The OS handles a page fault by locating the missing page and loading it as needed.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which data structure maps virtual pages to physical frames?
A. Page table
B. Process queue
C. File descriptor table only
D. Boot table
Correct Answer: A
Page tables store address-translation mappings and protection information.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
In paging, a process's virtual address space is divided into fixed-size units called:
A. Sectors only
B. Pages
C. Frames
D. Cylinders
Correct Answer: B
Pages are fixed-size virtual-memory blocks mapped to physical frames.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
In paging, physical memory is divided into fixed-size units called:
A. Tracks
B. Directories
C. Frames
D. Segments
Correct Answer: C
Physical RAM is divided into frames; virtual memory is divided into pages of the same size.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which cache stores recently used virtual-to-physical address translations?
A. Disk cache only
B. Print spool
C. Boot cache
D. Translation Lookaside Buffer (TLB)
Correct Answer: D
The TLB is a fast associative cache of page-table translations.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which hardware unit translates virtual or logical addresses into physical addresses?
A. Memory Management Unit (MMU)
B. Arithmetic Logic Unit
C. Disk controller
D. Network switch
Correct Answer: A
The MMU performs address translation, typically with support from page tables and the TLB.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which problem differs from deadlock because a process may wait indefinitely even though the system as a whole continues to make progress?
A. Caching
B. Starvation
C. Booting
D. Journaling
Correct Answer: B
Starvation is indefinite postponement; deadlock is a cyclic resource wait among blocked processes.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
How does imposing a fixed global order on resource acquisition help prevent deadlock?
A. It removes all context switches
B. It disables interrupts
C. It breaks circular wait
D. It guarantees no mutual exclusion
Correct Answer: C
Resource ordering prevents cyclic request chains, breaking the circular-wait condition.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
The ostrich approach to deadlocks means:
A. Prevent every deadlock condition
B. Use only Banker's algorithm
C. Reboot after every process
D. Ignore the problem when the expected cost of handling it exceeds the risk
Correct Answer: D
Some general-purpose systems ignore rare deadlocks when full handling would be too expensive.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which is a valid deadlock recovery technique?
A. Terminate one or more processes or preempt resources
B. Increase monitor resolution
C. Rename files
D. Disable virtual memory permanently
Correct Answer: A
Recovery can break the deadlock by process termination or controlled resource preemption.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
In a resource-allocation graph with one instance of each resource type, a cycle indicates:
A. Thrashing
B. Deadlock
C. Guaranteed starvation only
D. Page fault
Correct Answer: B
With single-instance resource types, a cycle is both necessary and sufficient for deadlock.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
An unsafe state is best described as:
A. A state with no processes
B. A state with only one file
C. A state that may lead to deadlock even if deadlock has not yet occurred
D. A state in which deadlock is impossible
Correct Answer: C
Unsafe does not necessarily mean deadlocked, but no guaranteed safe completion sequence exists.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
A safe state means:
A. No process is currently running
B. All resources are unused
C. A deadlock has already occurred
D. There exists at least one sequence in which all processes can finish
Correct Answer: D
A safe state has a safe sequence that can satisfy all processes' maximum claims.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Which algorithm is classically used for deadlock avoidance?
A. Banker's algorithm
B. Round Robin
C. LRU
D. SCAN
Correct Answer: A
Banker's algorithm checks whether granting a request preserves a safe state.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Deadlock avoidance differs from prevention because avoidance:
A. Always terminates processes immediately
B. Examines each allocation to keep the system in a safe state
C. Bans all resource sharing
D. Requires no resource information
Correct Answer: B
Avoidance uses future maximum-demand information to avoid unsafe allocations.
CSS - PMS - CCE - PCS - Basic Computing
Operating Systems
Deadlock prevention works primarily by:
A. Ignoring deadlocks permanently
B. Increasing page size
C. Ensuring at least one necessary deadlock condition can never hold
D. Allowing every possible resource request
Correct Answer: C
Prevention structurally breaks one of the Coffman conditions.