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

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



play-rounded-fill play-rounded-outline play-sharp-fill play-sharp-outline
pause-sharp-outline pause-sharp-fill pause-rounded-outline pause-rounded-fill
00:00
ยฉ 2018 Flowplayer ABAbout FlowplayerGPL based license

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.


Contents [hide]

๐ŸŽฏ 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:

  • Average Waiting Time = (0 + 7 + 15 + 9) / 4 = 7.75 ms

  • Average Turnaround Time = (8 + 11 + 24 + 14) / 4 = 14.25 ms


๐Ÿ“ฆ Summary:

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

๐Ÿ’ก Key Concepts to Remember:

  • In Non-preemptive SJF, CPU waits for a process to finish before giving it to the next.

  • Always update available processes at each CPU idle time.

  • For equal burst times, use arrival time as tie-breaker.


๐Ÿ“˜ 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 โ€ฆ



Leave a Reply

Your email address will not be published. Required fields are marked *

error: