CPU Scheduling

0.0(0)
studied byStudied by 7 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/25

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 4:52 PM on 1/29/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

26 Terms

1
New cards

What is response time?

Time from arrival until the process first gets the CPU

2
New cards

What is wait time?

Total time a process spends in the ready queue

3
New cards

What is turnaround time?

Time from arrival to completion

4
New cards

Response time formula?

First CPU start time − arrival time

5
New cards

Turnaround time formula?

Finish time − arrival time

6
New cards

Wait time formula?

Turnaround time − total CPU burst time

7
New cards

Which scheduling minimizes average turnaround time?

SJN / SRTF

8
New cards

Which scheduling is most fair?

Round Robin

9
New cards

Which scheduling risks starvation?

SJN

10
New cards

What must you draw first to solve scheduling problems?

A Gantt chart (timeline)

11
New cards

Common exam mistake in wait time?

Forgetting to subtract CPU burst from turnaround time

12
New cards

Given FIFO scheduling, when does a process wait?

When earlier-arriving processes are running

13
New cards

FIFO example: P1 arrives at 0 (5ms), P2 arrives at 2 (3ms). What is P2's response time?

P2 starts at 5 → response time = 5 − 2 = 3ms

14
New cards

FIFO example: P1 (5ms at 0), P2 (3ms at 2). What is P2's turnaround time?

Finishes at 8 → turnaround = 8 − 2 = 6ms

15
New cards

FIFO example: P1 (5ms at 0), P2 (3ms at 2). What is P2's wait time?

Turnaround 6 − burst 3 = 3ms

16
New cards

RR example: Quantum = 2ms. P1(4ms,0), P2(3ms,0). What is P2's response time?

P1 runs first (0–2), P2 starts at 2 → response = 2ms

17
New cards

RR example: Quantum = 2ms. P1(4ms,0), P2(3ms,0). What is P2's turnaround time?

Schedule: P1 0–2, P2 2–4, P1 4–6, P2 6–7 → turnaround = 7 − 0 = 7ms

18
New cards

RR example: Quantum = 2ms. P1(4ms,0), P2(3ms,0). What is P2's wait time?

Turnaround 7 − burst 3 = 4ms

19
New cards

SJN example: P1(6ms,0), P2(2ms,0), P3(4ms,0). What runs first?

P2 → P3 → P1

20
New cards

SJN definition?

Runs the process with the shortest CPU burst first

21
New cards

SJN example: P1(6ms,0), P2(2ms,0), P3(4ms,0). What is P1's wait time?

P1 waits for P2 and P3 → 2 + 4 = 6ms

22
New cards

SRTF definition?

Preemptive version of SJN based on remaining time

23
New cards

SRTF example: P1(8ms,0), P2(4ms,2). What happens at time 2?

P2 preempts P1 because it has shorter remaining time

24
New cards

SRTF example: P1(8ms,0), P2(4ms,2). What is P2's response time?

P2 starts immediately at time 2 → response = 0ms

25
New cards

SRTF example: P1(8ms,0), P2(4ms,2). What is P2's turnaround time?

P2 finishes at time 6 → turnaround = 6 − 2 = 4ms

26
New cards

Round Robin definition?

Preemptive scheduling with fixed time slices

Explore top flashcards