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

Shortest Job First Algorithm

The document describes using shortest job first (SJF) and shortest remaining time first (SRTF) scheduling algorithms to schedule 5 processes (P1-P5) with different burst times (BT) and arrival times (AT). SJF results in waits of 0, 29, 14, 4, and 5 and a total turnaround time of 43 for P1. SRTF results in waits of 28, 0, 13, 3, and 4 and a total turnaround time of 43 for P1. The Gantt charts for SJF and SRTF are also provided.

Uploaded by

Junnel Fadrilan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views

Shortest Job First Algorithm

The document describes using shortest job first (SJF) and shortest remaining time first (SRTF) scheduling algorithms to schedule 5 processes (P1-P5) with different burst times (BT) and arrival times (AT). SJF results in waits of 0, 29, 14, 4, and 5 and a total turnaround time of 43 for P1. SRTF results in waits of 28, 0, 13, 3, and 4 and a total turnaround time of 43 for P1. The Gantt charts for SJF and SRTF are also provided.

Uploaded by

Junnel Fadrilan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Shortest Job First Algorithm.

Schedule the following processes using shortest job first algorithms by drawing
the Gantt charts and compute required parameters by completing the table below. (20 pts.)
Process

BT

AT

P1
P2
P3
P4
P5

15
10
9
4
5

0
4
5
11
23

SJF
WT
0
29
14
4
5

SJF

SRTF
TAT
43
10
22
7
9

SRTF
WT
28
0
13
3
4

SRTF

P1 15 P4 4
P3 9
P5 5
P2 10
15
19
28
33
43

P1 4
4

P2 10
14

P4 4

P3 9
18
27

P5 5
32

.
Problem Solving: Draw the required Gantt charts and complete the table below. HPL =10 (35 pts.)
Process

BT

AT

PL

P1
P2
P3
P4
P5

15
10
9
3
5

0
5
5
10
20

4
6
5
4
10

SJF (NP)
WT

SRTF
WT

PSA Pre
WT

PSA (NP)
TAT

RR (QT =6)
WT

P1 11
43

You might also like