GATE CSE MCQs - Operating Systems: Scheduling, Paging, Deadlocks and Synchronization

GATE CSE MCQs - Operating Systems: Scheduling, Paging, Deadlocks and Synchronization - CodingHumans

Operating Systems questions in GATE CSE are mostly numerical: compute a waiting time, count page faults, size a page table or trace a semaphore. This practice set mixes those calculations with the concepts behind them. Work each one on paper first, then compare with the step-by-step explanation.

How to practise: read each question and tap the option you think is correct. You will see right away whether you got it, along with a short explanation, and your score is tracked at the bottom of the screen. This set has 15 questions.

Topics covered in this set

  • Round robin and SJF scheduling
  • FIFO and LRU page replacement, Belady's anomaly
  • TLB effective access time and page table size
  • Semaphores and Peterson's solution
  • Deadlock conditions
  • fork() counting and disk scheduling

GATE CSE Operating Systems MCQs with answers and explanations

Q1. Processes P1, P2 and P3 arrive at time 0 with burst times 5, 3 and 1 ms, in that order. With round robin and a time quantum of 2 ms, what is the average waiting time?

a) 3.00 ms

b) 5.00 ms

c) 3.67 ms

d) 4.33 ms

Q2. Which scheduling algorithm gives the minimum average waiting time for a given set of processes when preemption is allowed?

a) Priority scheduling

b) FCFS

c) Round robin

d) Shortest Remaining Time First (preemptive SJF)

Q3. For the reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2 with 3 frames, initially empty, how many page faults does FIFO cause?

a) 12

b) 9

c) 10

d) 11

Q4. For the reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2 with 3 frames, initially empty, how many page faults does LRU cause?

a) 10

b) 11

c) 9

d) 8

Q5. For the reference string 1, 2, 3, 4, 1, 2, 5, 1, 2, 3, 4, 5, FIFO gives 9 faults with 3 frames. How many with 4 frames?

a) 10

b) 9

c) 6

d) 8

Q6. A system has a TLB lookup time of 10 ns, memory access time of 100 ns and a TLB hit ratio of 90%. What is the effective memory access time, assuming a single-level page table?

a) 200 ns

b) 130 ns

c) 110 ns

d) 120 ns

Q7. A system uses 32-bit virtual addresses, 4 KB pages and 4-byte page table entries. What is the size of a single-level page table per process?

a) 16 MB

b) 4 MB

c) 4 KB

d) 1 MB

Q8. A counting semaphore is initialised to 5. Then 8 P (wait) operations and 3 V (signal) operations are performed. What is the final value, using the definition that lets the value go negative?

a) -3

b) 5

c) 0

d) 3

Q9. Which of these is NOT one of the four necessary conditions for deadlock?

a) Preemption of resources

b) Mutual exclusion

c) Circular wait

d) Hold and wait

Q10. How many times is "hello" printed?

int main() {
  fork();
  fork();
  fork();
  printf("hello\n");
}

a) 7

b) 6

c) 3

d) 8

Q11. A disk head is at cylinder 50. Requests arrive for 82, 170, 43, 140, 24, 16, 190. What is the total head movement under FCFS?

a) 602

b) 208

c) 642

d) 542

Q12. Which type of fragmentation does paging suffer from?

a) Internal fragmentation, in the last page of a process

b) Neither

c) Both, equally

d) External fragmentation only

Q13. What is thrashing?

a) Running too many CPU-bound jobs

b) A disk failure

c) A state where the system spends most of its time swapping pages in and out because processes do not have enough frames for their working sets

d) A cache coherence problem

Q14. Peterson's solution for two processes guarantees which properties?

a) Deadlock but not starvation

b) Mutual exclusion, progress and bounded waiting

c) Progress only

d) Mutual exclusion only

Q15. What is stored during a context switch so that a process can resume later?

a) Only the program counter

b) The whole disk contents

c) Nothing, processes restart from the beginning

d) The process state in its PCB: registers, program counter, stack pointer and memory-management information

Quick revision notes

  • Waiting time = completion − arrival − burst.
  • EAT with TLB = h(t + m) + (1 − h)(t + 2m) for one-level paging.
  • Page table size = (2^VA / page size) × entry size.
  • n fork() calls create 2ⁿ processes.
  • Belady's anomaly affects FIFO, not LRU or optimal.

Frequently asked questions

Are these real GATE questions?

No, they are original GATE-style practice questions. The numbers are chosen to match the exam's difficulty.

Which OS topics come up most often in GATE?

Scheduling, memory management (paging, TLB, page replacement), synchronisation with semaphores, and deadlock appear almost every year.

How should I practise numericals?

Write out the timeline or frame table every time. Most mistakes come from skipping steps.

Comments

Answered 0/0Correct 0