---
title: "Non-preemptive priority scheduling (10, 5, 7 ms)"
subject: "Embedded System"
chapter: 6
key: "semester_6/embedded_system:sched-priority-nonpreemptive-10-5-7"
source: https://www.bctengineer.com/q/semester_6/embedded_system/sched-priority-nonpreemptive-10-5-7
site: BCT Engineering
---

# Non-preemptive priority scheduling (10, 5, 7 ms)

Embedded System · Chapter 6: RTOS

- Asked in: 2078 Poush, 6 marks
- Video: [Non Preemptive Priority Scheduling Algorithm| Operating System  | OS](https://www.youtube.com/watch?v=WPQP4n3GIkw) — Sudhakar Atchala
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/embedded_system/sched-priority-nonpreemptive-10-5-7
- Whole chapter: https://www.bctengineer.com/md/semester_6/embedded_system/chapter-6

## Question

Three processes with process IDs P1, P2, P3 with estimated completion time 10, 5, 7 ms and priorities 0, 2, 3 (0-highest, 3-lowest) respectively enter the ready queue together in order P1, P2, P3 (assume only P1 is present in the Ready queue when the scheduler picks it up and P2 & P3 enter ready queue after that). Now a process P4 with estimated completion time 6 ms and priority 1 enters the ready queue after 6 ms of execution of P1. Calculate waiting time and TAT for each process and average waiting time and average TAT. Assume there is no I/O waiting for the processes and priority-based non-preemptive scheduling.

## Short answer

Non-preemptive priority gives order P1, P4, P2, P3. Waiting times: P1=0, P2=16, P3=21, P4=4 ms. Average waiting time = 10.25 ms, average turnaround time = 17.25 ms.

## Answer

In non-preemptive priority scheduling a running process is never interrupted; when it ends, the ready process with the highest priority (lowest number) is chosen. P1 is alone when picked, so it starts at 0 and P2, P3 join the queue just after. P4 arrives at 6 ms (6 ms into P1).

#### Gantt chart

```text
| P1 | P4 | P2 | P3 |
0    10   16   21   28
```

#### Trace

- 0-10: P1 runs to completion (no preemption, although P4 arrives at 6).
- At 10 the ready queue holds P2 (priority 2), P3 (priority 3), P4 (priority 1). P4 is chosen: 10-16.
- 16-21: P2 (priority 2). 21-28: P3 (priority 3).

#### Calculation

TAT = completion time - arrival time; WT = TAT - burst time.

| Process | AT | BT | CT | TAT = CT - AT | WT = TAT - BT |
|---|---|---|---|---|---|
| P1 | 0 | 10 | 10 | 10 | 0 |
| P2 | 0 | 5 | 21 | 21 | 16 |
| P3 | 0 | 7 | 28 | 28 | 21 |
| P4 | 6 | 6 | 16 | 10 | 4 |

AWT = (0 + 16 + 21 + 4) / 4 = 41/4 = 10.25 ms

ATAT = (10 + 21 + 28 + 10) / 4 = 69/4 = 17.25 ms

**Answer: AWT = 10.25 ms, ATAT = 17.25 ms.**

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Why does P4 not interrupt P1 at 6 ms?
   A. P4 has lowest priority
   B. P4 arrived late
   C. Non-preemptive scheduling never interrupts a running process
   D. P1 has equal priority
   Answer: C. P1 runs to completion at 10. (Key point: Non-preemptive)

2. Who is chosen at t = 10?
   A. P2 (priority 2)
   B. P4 (priority 1)
   C. P3 (priority 3)
   D. The shortest burst
   Answer: B. Among P2, P3, P4 the lowest priority number wins. (Key point: Next at 10)

3. What is P4's waiting time?
   A. 4 ms
   B. 10 ms
   C. 6 ms
   D. 0 ms
   Answer: A. TAT = 16 - 6 = 10, WT = 10 - 6 = 4. (Key point: P4 waiting)

4. What are AWT and ATAT?
   A. 17.25 ms and 10.25 ms
   B. 11.25 ms and 18.25 ms
   C. 41 ms and 69 ms
   D. 10.25 ms and 17.25 ms
   Answer: D. AWT = 41/4; ATAT = 69/4. (Key point: Averages)

## Close variants set in other exams

- [Priority scheduling (7, 8, 5 ms) with P4](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-7-8-5-p4) — Embedded System, chapter 6, asked 2×

## Related in Embedded System

- [Preemptive priority scheduling with P4 (6 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-10-5-7-p4) — Embedded System, chapter 6, asked 2×
- [Preemptive priority scheduling (4, 10, 5 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-4-10-5-p4) — Embedded System, chapter 6, asked 2×
- [Preemptive priority scheduling (4, 6, 5 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-4-6-5) — Embedded System, chapter 6
- [Preemptive SJF/SRT scheduling (10, 5, 7 ms)](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-srt-10-5-7) — Embedded System, chapter 6
- [Priority and SJF scheduling with P4 and P5](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-priority-and-sjf-5-process) — Embedded System, chapter 6, asked 2×
- [Non-preemptive SJF with P4 arriving](https://www.bctengineer.com/question.md?key=semester_6%2Fembedded_system%3Asched-sjf-nonpreemptive-6-8-2) — Embedded System, chapter 6, asked 2×

## Related in other subjects

- [Preemptive vs non-preemptive; real-time scheduling](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Apreemptive-nonpreemptive-realtime) — Operating System, chapter 2
- [Preemptive priority and SRTF Gantt](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Apreemptive-priority-srtf-gantt) — Operating System, chapter 2
- [RR, preemptive priority, preemptive SJF](https://www.bctengineer.com/question.md?key=semester_6%2Foperating_system%3Aprocess-rr-priority-preemptive-sjf) — Operating System, chapter 2
