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.
Which of these are safe sequences for the state shown? (Select all that apply.)
| Process | Alloc A | Alloc B | Alloc C | Max A | Max B | Max C |
|---|---|---|---|---|---|---|
| P0 | 0 | 1 | 0 | 7 | 5 | 3 |
| P1 | 2 | 0 | 0 | 3 | 2 | 2 |
| P2 | 3 | 0 | 2 | 9 | 0 | 2 |
| P3 | 2 | 1 | 1 | 2 | 2 | 2 |
| P4 | 0 | 0 | 2 | 4 | 3 | 3 |
Show answer and explanation
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.
SRTF scheduling. Which statements are true?
| Process | Arrival | Burst |
|---|---|---|
| P1 | 0 | 12 |
| P2 | 2 | 4 |
| P3 | 3 | 6 |
| P4 | 8 | 5 |
Show answer and explanation
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.
Which of these satisfy mutual exclusion, progress and bounded waiting (assuming sequentially consistent memory)?
Show answer and explanation
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.