GATE GATE Operating Systems 1 — Questions and Answers
Question 1: Which page replacement algorithm suffers from Belady's anomaly?
- FIFO (Correct answer)
- LRU
- Optimal
- Clock
Correct answer: FIFO
FIFO can paradoxically increase page faults when more frames are added, a phenomenon known as Belady's anomaly.
Question 2: In a system with 5 processes and 3 resource types, which algorithm is used to detect deadlock?
- Banker's algorithm
- Resource-allocation graph algorithm
- Wait-for graph algorithm
- Cycle detection in allocation graph (Correct answer)
Correct answer: Cycle detection in allocation graph
Deadlock detection in multi-instance resource systems uses a cycle-detection algorithm on the resource-allocation graph.
Question 3: Which scheduling algorithm can cause starvation of low-priority processes?
- Round Robin
- Shortest Job First (non-preemptive)
- Priority Scheduling (Correct answer)
- FCFS
Correct answer: Priority Scheduling
Priority Scheduling can starve low-priority processes indefinitely if high-priority processes keep arriving.
Question 4: What is the main advantage of multilevel feedback queue scheduling?
- It is simple to implement
- It adapts to process behavior dynamically (Correct answer)
- It guarantees no starvation
- It requires no context switching
Correct answer: It adapts to process behavior dynamically
Multilevel feedback queues promote or demote processes based on their CPU burst behavior, adapting dynamically to workload characteristics.
Question 5: In virtual memory, what does the Translation Lookaside Buffer (TLB) store?
- Physical memory pages
- Page table entries for recently accessed pages (Correct answer)
- Free frame list
- Disk block addresses
Correct answer: Page table entries for recently accessed pages
The TLB is a hardware cache that stores recent virtual-to-physical page table mappings to speed up address translation.
Question 6: Which of the following is NOT a condition for deadlock?
- Mutual exclusion
- Preemption (Correct answer)
- Hold and wait
- Circular wait
Correct answer: Preemption
Preemption (allowing resources to be forcibly taken) prevents deadlock; the four necessary conditions are mutual exclusion, hold-and-wait, no preemption, and circular wait.
Which page replacement algorithm suffers from Belady's anomaly?