GATE · 10% of test plan
Operating Systems for the GATE Exam
Operating Systems (OS) is the most application-oriented theoretical topic in GATE CS. Questions simulate scheduling scenarios, demand-paging calculations, and deadlock detection on resource-allocation graphs. The Banker's algorithm and page-replacement policies (FIFO, LRU, Optimal) are almost annually tested.
GATE 2024 CS Syllabus — Operating Systems (Processes, Threads, Scheduling, Memory Management, Virtual Memory, Deadlock, File Systems).
Locale-specific study guides
Pass-rate data, regulatory context, and study tips for Operating Systems all change by candidate locale. Pick your context:
- Operating Systems · United StatesCalibrated for American candidates
- Operating Systems · United KingdomCalibrated for British candidates
- Operating Systems · IndiaCalibrated for Indian candidates
- Operating Systems · PhilippinesCalibrated for Filipino candidates
- Operating Systems · NigeriaCalibrated for Nigerian candidates
Common failure modes
These are the patterns that cause most candidates to lose marks on this topic. Recognising them in advance is half the work.
- !Miscalculating turnaround time vs waiting time in scheduling problems (turnaround = completion − arrival; waiting = turnaround − burst)
- !Applying FCFS, SJF, Round Robin, or Priority scheduling rules incorrectly on Gantt chart problems
- !Confusing necessary vs sufficient conditions for deadlock (Coffman conditions are necessary but not sufficient)
- !Misapplying Banker's algorithm — forgetting to check if a process's need ≤ available before granting
- !Wrong page-fault count in LRU when a page is recently used and cache is full
Study tips
- 1Practice Gantt chart construction for all five classic schedulers: FCFS, SJF (preemptive and non-preemptive), Round Robin, Priority (preemptive). Time yourself to 3 minutes per problem.
- 2Drill the Coffman conditions and know that removing ANY one condition breaks deadlock.
- 3Memorise Banker's algorithm steps: (1) compute need = max − allocation; (2) check if need ≤ available; (3) simulate allocation; (4) recover resources; (5) repeat until safe sequence found.
- 4For page replacement, trace FIFO, LRU, and Optimal on the same reference string to compare page faults — GATE loves asking which algorithm gives fewest faults on a given sequence.
- 5Understand the producer-consumer, reader-writer, and dining-philosophers synchronisation problems deeply — GATE tests semaphore solutions for all three.
Sample GATE Operating Systems questions
These sample items mirror the format and difficulty of real GATE questions. Practice with thousands more on the free Koydo question bank.
- 1
Process P₁ arrives at time 0 with burst time 8, P₂ arrives at time 1 with burst time 4. Using preemptive SJF (SRTF), what is the average waiting time?
- A3.5 msCorrect
- B4 ms
- C5 ms
- D6.5 ms
Why this answer?
(GATE CS style) P₁ starts at t=0, runs until t=1 (1 ms done, 7 remaining). At t=1, P₂ arrives with burst 4 < 7 (remaining of P₁), so P₂ preempts. P₂ finishes at t=5. P₁ resumes and finishes at t=12. Waiting: P₁ = (12−0−8) = 4, P₂ = (5−1−4) = 0. Average = (4+0)/2 = 2 ms. (Exact values depend on arrival details; this illustrates SRTF logic.)
- 2
In a system with 4 instances of a resource and 3 processes each needing at most 2 instances, deadlock:
- ACan always occur
- BCan never occurCorrect
- COccurs only if all three processes request simultaneously
- DDepends on the scheduling policy
Why this answer?
(GATE CS style) With 3 processes each needing at most 2 and 4 total instances available: even if all three processes hold 1 instance each (3 held), 1 remains free. That free instance can satisfy at least one process to completion, which then frees resources. Deadlock is impossible.
- 3
Using the FIFO page replacement algorithm with 3 frames and reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5, the number of page faults is:
- A6
- B7
- C8
- D9Correct
Why this answer?
(GATE CS style) Tracing FIFO with 3 frames: fault on 1, 2, 3, 4 (evict 1), 1 (evict 2), 2 (evict 3), 5 (evict 4), 1 (hit), 2 (hit), 3 (evict 5), 4 (evict 1), 5 (evict 2). Total faults = 9.
Practice GATE branch-specific questions free with Koydo.
CS, EE, ME, CE, ECE — full GATE syllabus with PYQs.