LearnFrenzy
Sign in Take a free test

Operating Systems · Topic 11 of 11

GATE-Style OS Questions (MSQ & NAT): questions with answers

Multiple-select and numerical-answer OS questions in the GATE CSE pattern: safe sequences, schedules, page faults, disk movement, interleavings, page tables and access times.

Questions
45
Timed sets
3
Answers run or computed
38
Your accuracy
–

What this topic covers

10 subtopics
  • CPU scheduling9
  • Page replacement6
  • Deadlocks5
  • Paging5
  • Processes5
  • Synchronisation5
  • Disk scheduling3
  • Virtual memory3
  • File systems2
  • Memory allocation2
  • Beginner 15
  • Intermediate 15
  • Advanced 15

About this topic

GATE CSE asks two kinds of question that ordinary MCQ practice does not prepare you for: multiple-select questions (MSQ), where you must tick every correct option and nothing else, and numerical-answer questions (NAT), where you type the number. Neither has negative marking, and an MSQ gives no partial credit. Each MSQ here was checked by a program that tests every option, and every number was computed. These are pattern questions written for practice, not previous-year questions.

Free preview

Sample questions

Try each one first, then open the answer for the explanation and why the other options are wrong.

Question 1 Deadlocks Beginner Practice Answer computed One or more answers

Which of these are safe sequences for the state shown? (Select all that apply.)

System stateAvailable: A = 3, B = 3, C = 2
ProcessAlloc AAlloc BAlloc CMax AMax BMax C
P0010753
P1200322
P2302902
P3211222
P4002433
P0 P1 P2 P3 P4
P1 P3 P0 P2 P4
P3 P1 P4 P0 P2
P4 P1 P3 P0 P2
P1 P3 P4 P2 P0
Show answer and explanation
Correct answer BCE

Explanation

Need: P0 (7,4,3), P1 (1,2,2), P2 (6,0,0), P3 (0,1,1), P4 (4,3,1). A sequence is safe if each process's Need fits in Work when its turn comes. P0 first needs 7 A (only 3 free); P4 first needs 4 A.

Question 2 CPU scheduling Intermediate Practice Answer computed One or more answers

SRTF scheduling. Which statements are true?

Processes
ProcessArrivalBurst
P1012
P224
P336
P485
The average waiting time is 6
P2 is the first process to complete
P4 completes at time 16
P3 waits 3 units in total
P1 is preempted exactly once
Show answer and explanation
Correct answer BDE

Explanation

Gantt: P1 0–2, P2 2–6, P3 6–12, P4 12–17, P1 17–27. Waiting: P1 15, P2 0, P3 3, P4 4 → average 5.5.

Question 3 Synchronisation Advanced Practice One or more answers

Which of these satisfy mutual exclusion, progress and bounded waiting (assuming sequentially consistent memory)?

Peterson's solution for two processes
Disabling interrupts on a multiprocessor
Lamport's bakery algorithm
Strict alternation with a turn variable
A plain test-and-set spinlock
Show answer and explanation
Correct answer AC

Explanation

A test-and-set spinlock lacks bounded waiting; strict alternation lacks progress; disabling interrupts on one CPU does not stop the others, so mutual exclusion fails.

Why the other options are wrong

  • BNo mutual exclusion across CPUs.
  • DNo progress.
  • ENo bounded waiting.
42 more questions in the timed setsSame format as the samples, with a timer, a question palette and a full review at the end.
Start practising

Operating Systems

All 11 topics

Topics, levels and full mocks
  1. 01 OS Basics and System Calls45 questions · 3 levels
  2. 02 Processes, Threads and fork()45 questions · 3 levels
  3. 03 CPU Scheduling Algorithms45 questions · 3 levels
  4. 04 Process Synchronization and Semaphores45 questions · 3 levels
  5. 05 Deadlocks and Banker's Algorithm45 questions · 3 levels
  6. 06 Memory Management and Paging45 questions · 3 levels
  7. 07 Virtual Memory and Page Replacement45 questions · 3 levels
  8. 08 File Systems and Disk Scheduling45 questions · 3 levels
  9. 09 Threads and Concurrency in Code45 questions · 3 levels
  10. 10 Linux Commands and Shell45 questions · 3 levels
  11. 11 GATE-Style OS Questions (MSQ & NAT)45 questions · 3 levels

Search LearnFrenzy

Esc

Quick links