DIZNR INTERNATIONAL

Non preemptive scheduling โ€“ Solved Gate%20 Question Papers

Non preemptive scheduling โ€“ Solved Gate%20 Question Papers

https://www.gyanodhan.com/video/7B7.%20GATE%20CSEIT/Operating%20System/402.%20Non%20preemptive%20scheduling%20-%20Solved%20Gate%20%20Question%20Papers.mp4

Absolutely! Hereโ€™s a complete breakdown of Non-Preemptive Scheduling with a solved GATE-style question, including explanation, table, and Gantt chart โ€” tailored for GATE CSE/IT aspirants.


Topic: Non-Preemptive Scheduling

Subject: Operating System
GATE Relevance: High
Type: Numerical-based Questions (Process Scheduling)


What is Non-Preemptive Scheduling?

In Non-Preemptive Scheduling, once a process starts executing on the CPU, it cannot be stopped until it completes.
The CPU is assigned only after the current process finishes.
This contrasts with Preemptive scheduling, where the CPU can be taken away by a higher-priority task.


Common Non-Preemptive Scheduling Algorithms:

Algorithm Description
FCFS (First Come First Serve) Processed in order of arrival
SJF (Shortest Job First) Process with shortest burst time first
Priority Scheduling (Non-preemptive) Highest priority (lowest number) runs first

Solved GATE-Style Question: SJF (Non-Preemptive)

Question:
Consider the following processes:

Process Arrival Time Burst Time
P1 0 ms 8 ms
P2 1 ms 4 ms
P3 2 ms 9 ms
P4 3 ms 5 ms

Use Non-Preemptive SJF Scheduling.
Find the Average Waiting Time and Average Turnaround Time.


Step 1: Gantt Chart (SJF โ€“ Shortest Job First)

Initial time = 0, only P1 has arrived โ‡’ Execute P1
At time 8, P2, P3, P4 have arrived
Shortest burst time among them = P2 (4ms)
Next = P4 (5ms)
Then = P3 (9ms)

Gantt Chart:

| P1 | P2 | P4 | P3 |
0 8 12 17 26

Step 2: Calculate Completion, Turnaround, and Waiting Times

Process Arrival Time Burst Time Completion Time Turnaround Time (CT โ€“ AT) Waiting Time (TAT โ€“ BT)
P1 0 8 8 8 0
P2 1 4 12 11 7
P3 2 9 26 24 15
P4 3 5 17 14 9

Final Answers:


Summary:

Metric Value
Avg Waiting Time 7.75 ms
Avg Turnaround Time 14.25 ms

Key Concepts to Remember:


Want more GATE previous year solved papers for OS scheduling?
I can generate a full PDF set, practice quizzes, or custom short tricks โ€” just let me know what format you prefer!

Non preemptive scheduling โ€“ Solved Gate%20 Question Papers

Operating System Sl.No. Name of the Topic 1. Process โ€ฆ