0% found this document useful (0 votes)
140 views

Name: Assignment - CPU Scheduling Algorithms (Single Queue) Grade

The document provides details of a CPU scheduling simulation that compares different algorithms: FCFS, SJF, SRTF, NPP, PP, and RR. It includes the job details, Gantt charts, turnaround times, waiting times, and average metrics for each algorithm based on the given jobs data with arrival times and burst times.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
140 views

Name: Assignment - CPU Scheduling Algorithms (Single Queue) Grade

The document provides details of a CPU scheduling simulation that compares different algorithms: FCFS, SJF, SRTF, NPP, PP, and RR. It includes the job details, Gantt charts, turnaround times, waiting times, and average metrics for each algorithm based on the given jobs data with arrival times and burst times.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Assignment – CPU Scheduling Grade:

Name: Algorithms (Single Queue)

Based on the given data, provide the Gantt Chart and calculate the turn-around time and waiting time
of each of the jobs (include the average turn-around and average waiting time) using the following
algorithms:

A. First Come First Serve FCFS D. Shortest Remaining Time First SRTF
B. Shortest Job First SJF E. Pre-emptive Priority PP
C. Non Pre-emptive Priority NPP F. Round Robin q = 5 RR q= 5

Jobs Arrival Time Burst Time Priority


A 0 11 5
B 4 5 2
C 10 4 3
D 30 9 4
E 6 15 1
F 14 13 6
G 26 11 3
H 27 2 2
I 8 3 1

Gantt Chart:
First Come First Serve

FCFS
Turn-Around Time Waiting Time
A
B
C
D
E
F
G
H
I
Averag

1 Single Queues Set 3


Assignment – CPU Scheduling Grade:
Name: Algorithms (Single Queue)

2 Single Queues Set 3


Assignment – CPU Scheduling Grade:
Name: Algorithms (Single Queue)

Gantt Chart:
Shortest Job First

SJF
Turn-Around Time Waiting Time
A
B
C
D
E
F
G
H
I
Averag
e

Gantt Chart:
Non Pre-emptive Priority

NPP
Turn-Around Time Waiting Time
A
B
C
D
E
F
G
H
I
Averag
e

3 Single Queue Set 3


Assignment – CPU Scheduling Grade:
Name: Algorithms (Single Queue)

Gantt Chart:
Shortest Remaining Time First

SRTF
Turn-Around Time Waiting Time
A
B
C
D
E
F
G
H
I
Averag
e

4 Single Queue Set 3


Assignment – CPU Scheduling Grade:
Name: Algorithms (Single Queue)

Gantt Chart:
Pre-emptive Priority

PP
Turn-Around Time Waiting Time
A
B
C
D
E
F
G
H
I
Averag
e

5 Single Queue Set 3


Assignment – CPU Scheduling Grade:
Name: Algorithms (Single Queue)

Gantt Chart:
Round Robin quantum = 5

RR q=5
Turn-Around Time Waiting Time
A
B
C
D
E
F
G
H
I
Averag
e

6 Single Queue Set 3


Assignment – CPU Scheduling Grade:
Name: Algorithms (Single Queue)

END TIME 73

Proces Arrival Burst


Priority
s Time Time
A 0 11 5
B 4 5 2
C 10 4 3
D 30 9 4
E 6 15 1
F 14 13 6
G 26 11 3
H 27 2 2
I 8 3 1
FCFS ABEICFGHD
Shortest Job First (SJF) AICBFHDGE
Shortest Remaining Time First (SRTF) ABICAFHFDGE
Non Preemptive Priority (NPP) AEIBHCGDF
Preemptive Priority (PP) ABEIBHCGDAF
Round Robin (RR) with quantum = 4 ABAE IBCA FEGH DFEG DFEG DF
Rr Q=5 ABAE ICFA EGHD FEGD FG

TTA TTB TTC TTD TTE TTF TTG TTH TTI TTAVE
FCFS 11 12 28 43 25 37 36 37 26 28.33
SJF 11 19 8 17 67 22 32 11 6 21.44
SRTF 23 5 6 17 67 24 32 2 4 20
NPP 11 30 30 30 20 59 25 9 21 26.11
PP 60 23 23 23 15 59 18 2 16 26.56
RRQ4 27 16 14 42 62 59 45 14 11 32.22
RRQ5 33 6 17 39 54 58 47 18 15 31.89

WTA WTB WTC WTD WTE WTF WTG WTH WTI WTAVE
FCFS 0 7 24 34 10 24 25 35 23 20.22
SJF 0 14 4 8 52 9 21 9 3 13.33
SRTF 12 0 2 8 52 11 21 0 1 11.89
NPP 0 25 26 21 5 46 14 7 18 18
PP 49 18 19 14 0 46 7 0 13 18.44
RRQ4 16 11 10 33 47 46 34 12 8 24.11
RRQ5 22 1 13 30 39 45 36 16 12 23.78

1.0 18
1.25 16-17
1.5 14-15
1.75 12-13
2.0 10-11
2.25 7-9
2.5 4-6
2.75 1-3
3.0 0

7 Single Queue Set 3

You might also like