Operating Systems for GATE: How to Study Deadlocks, Scheduling and Memory

Operating Systems is one of the densest, most-tested GATE CS subjects. Here is how to study its three biggest areas — scheduling, deadlocks and memory — so the marks actually come.

Prashant Jain

KnowledgeGate AI educator

5 Jul 20264 min read

Operating Systems is one of those GATE CS subjects that feels intuitive when you watch a lecture and then falls apart the moment you face a numerical question. It is also one of the most heavily tested subjects on the paper — our practice bank alone has close to 2,000 published Operating System questions — so getting it right has an outsized effect on your score. This guide focuses on the three areas that carry most of those marks: CPU scheduling, deadlocks, and memory management.

Why OS trips people up

The subject sits exactly on the boundary between concept and calculation. You need the concept to know *what* is happening, and you need calculation practice to answer *how much* — waiting time, page faults, frame counts. Students who only do one of the two lose marks: the concept-only student cannot finish a numerical, and the formula-only student picks the wrong formula because they never understood the scenario. The fix is to always pair a concept with its previous-year numericals immediately.

CPU scheduling

Scheduling is the friendliest place to start because the questions are concrete. You are given a set of processes with arrival and burst times and asked for average waiting time, turnaround time, or response time under a particular algorithm.

The algorithms you must know cold:

  • First-Come-First-Served (FCFS) — simple, but watch the convoy effect.

  • Shortest Job First (SJF) and its preemptive form, Shortest Remaining Time First — optimal for average waiting time, and a frequent source of tricky preemption questions.

  • Round Robin — where the time quantum changes everything; small quanta approach processor sharing, large quanta approach FCFS.

  • Priority scheduling — and the starvation problem it creates, solved by ageing.

The way to master this is mechanical repetition of Gantt charts. Draw the chart, compute the times, check against the answer, repeat until you never make an arithmetic slip. Because the pattern is so regular, this is one of the highest-return areas to drill.

Deadlocks

Deadlocks are more conceptual and, for that reason, more error-prone. Anchor everything on the four Coffman conditions — mutual exclusion, hold and wait, no preemption, and circular wait — because every deadlock question is really testing whether one of these can occur.

The topics that generate questions:

  • The four necessary conditions and how each prevention strategy removes one of them.

  • Resource-allocation graphs and how to detect a cycle — and why a cycle means deadlock only when each resource has a single instance.

  • The Banker's algorithm for deadlock avoidance. This is a favourite because it is procedural: given an allocation, maximum, and available matrix, determine whether a state is safe and find a safe sequence. Practise it until the steps are automatic.

Deadlock questions reward a careful, systematic hand. Write out the matrices, work the safe-sequence search step by step, and do not try to shortcut it in your head. A single misread cell in the need matrix propagates through the whole safe-sequence search, so slow and correct beats fast and wrong every time here.

One more distinction the exam loves to test: deadlock *prevention* removes one of the four conditions in advance, *avoidance* (the Banker's algorithm) uses runtime information to stay in safe states, and *detection and recovery* lets deadlock happen and then resolves it. Mixing these three up is a classic way to lose an easy conceptual mark.

Memory management

Memory is the widest of the three areas and the one where careful bookkeeping matters most.

Paging and virtual memory

Understand the translation from logical to physical addresses, page tables, the translation lookaside buffer (TLB), and how multi-level paging trades table size for lookup time. Effective-access-time questions that combine TLB hit ratios with memory-access times are a recurring pattern.

Page replacement

FIFO, Optimal, and Least Recently Used (LRU) are the core algorithms. Know how to simulate each against a reference string to count page faults, and know Belady's anomaly — the counter-intuitive result that FIFO can fault *more* with additional frames.

Segmentation and fragmentation

Understand the difference between internal and external fragmentation and which scheme causes which.

The common thread is the same as scheduling: these are simulation questions. You are handed a reference string or an address and asked to trace the algorithm exactly. Speed and accuracy come only from doing many of them.

How to actually practise

Reading about operating systems is comfortable and mostly useless on its own. The subject is learned through solved numericals. A practical loop:

  1. Learn one mechanism — say, LRU page replacement — conceptually.

  2. Immediately solve its previous-year questions, tracing each by hand.

  3. Review every mistake and note whether it was a concept slip or an arithmetic slip; they need different fixes.

  4. Return to it a week later to confirm it stuck.

This mirrors the broader case for practising previous-year questions first. Because OS is so dense and so consistently tested, it deserves a prominent place in your calendar — our subject weightage guide explains why the systems subjects earn your best study hours.

Fitting it into your prep

If you are working through a full plan, OS belongs in the systems-subjects phase alongside DBMS, Networks and COA. Line up a structured GATE test series so you practise OS questions inside timed, full-length papers rather than in isolation, and use the broader computer science course to shore up any fundamentals that feel shaky. The full CS fundamentals catalogue has the companion subjects when you are ready for them.

Master scheduling, deadlocks and memory — the three areas above — and you have captured most of what Operating Systems will ever ask you.