DIZNR INTERNATIONAL

Preemptive scheduling – Gate 2025 – TOC previous year solved question Paper.

Preemptive scheduling – Gate 2025 – TOC previous year solved question Paper.

https://www.gyanodhan.com/video/7B7.%20GATE%20CSEIT/Operating%20System/401.%20Preemptive%20scheduling%20-%20Gate%202009%20-%20TOC%20previous%20year%20solved%20question%20Paper.mp4

📘 Preemptive Scheduling – GATE 2025 | TOC Previous Year Solved Question

✅ Topic: Operating System (OS) – Preemptive CPU Scheduling
🎯 Exam Focus: GATE CSE / IT 2025
📂 Category: Theory of Computation (TOC often refers to OS in GATE context when dealing with scheduling topics)


⚙ क्या होता है Preemptive Scheduling?

Preemptive Scheduling एक CPU scheduling तकनीक है जिसमें running process को बीच में रोककर किसी दूसरे higher priority या ready process को CPU दिया जाता है।


Key Features:

Feature Description
Preemption हाँ (Yes) – Process को बीच में interrupt किया जा सकता है
Control OS के पास होता है
Response Time बेहतर
Context Switching ज़्यादा होता है (CPU overhead बढ़ता है)

Common Preemptive Algorithms:

  1. Round Robin (RR)

  2. Shortest Remaining Time First (SRTF)

  3. Preemptive Priority Scheduling


GATE Previous Year Solved Question (Example)

GATE CSE Question (Simplified):

GATE Year: 2017
Question Type: Numerical
Topic: Preemptive Scheduling – SRTF

Q:

Consider the following set of processes with arrival time and burst time:

Process Arrival Time Burst Time
P1 0 ms 7 ms
P2 2 ms 4 ms
P3 4 ms 1 ms
P4 5 ms 4 ms

Use Shortest Remaining Time First (Preemptive) scheduling.
What is the average waiting time?


Solution Step-by-Step:

Step 1: Gantt Chart

Time Running Process
0-2 P1 (7→5)
2-4 P2 (4→2)
4-5 P3 (1)
5-6 P2 (2→1)
6-7 P2 (1→0)
7-11 P4 (4)
11-13 P1 (5→3)
13-15 P1 (3→1)
15-17 P1 (1→0)

Completion Time (CT)

Process CT TAT (CT – AT) WT (TAT – BT)
P1 17 17 – 0 = 17 17 – 7 = 10
P2 7 7 – 2 = 5 5 – 4 = 1
P3 5 5 – 4 = 1 1 – 1 = 0
P4 11 11 – 5 = 6 6 – 4 = 2

Average Waiting Time:

= (10 + 1 + 0 + 2) / 4
= 13 / 4 = 3.25 ms


Concept Check:

Preemptive = Process को interrupt किया जा सकता है
Waiting Time = Turnaround Time – Burst Time
SRTF always selects the process with minimum remaining time


Summary:


Want a PDF version with solved examples + practice questions?

Just ask, and I’ll generate a downloadable file or quiz for practice.