Assignemant Three: Frantz Fanon University (Ffu)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

FRANTZ FANON UNIVERSITY (FFU)

ASSIGNEMANT THREE
Subject Name: Operating system
Shift: Morning

Student Id: 19129


Student Name: Khadar Adam Maxamuud

First-Come, First-Served (FCFS) Scheduling

Process Arrival time Burst time Priority


P1 0 9 3
P2 1 6 1
P3 2 12 2
P4 3 5 4
P5 4 11 6
P6 5 5 5

P1 P2 P3 P4 P5 P6

0 9 15 27 32 43 47

Waiting time for P1 = 0; P2 = 9; P3 = 15; P4 = 27; P5 = 32; P6 = 43;


Average waiting time :( 0+9+15+27+32+43)/6=21
FRANTZ FANON UNIVERSITY (FFU)
Shortest-Job-First (SJF) Scheduling
Process Arrival time Burst time Priority
P1 0 9 3
P2 1 6 1
P3 2 12 2
P4 3 5 4
P5 4 11 6
P6 5 4 5

P6 P4 P2 P1 P5 P3

0 4 9 15 24 35 47
Waiting time for P1 = 15; P2 = 9; P3 = 35; P4 = 4; P5 = 24; P6 = 0;

Average waiting time :( 4+15+9+24+35+0)/6=14.5

Shortest-remaining-time-first Process
FRANTZ FANON UNIVERSITY (FFU)
Process
Process Arrival time Burst time Priority
P1 0 9 3
P2 1 6 1
P3 2 12 2
P4 3 5 4
P5 4 11 6
P6 5 4 5

P6 P4 P2 P1 P5 P3

0 4 9 15 24 35 47

Waiting time for P1 = 15; P2 = 9; P3 = 35; P4 = 4; P5 = 24; P6 = 0;


Average waiting time :( 0+4+9+15+24+35)/6=22.3

Priority Scheduling
Process Arrival time Burst time Priority
P1 0 9 3
P2 1 6 1
P3 2 12 2
FRANTZ FANON UNIVERSITY (FFU)
P4 3 5 4
P5 4 11 6
P6 5 4 5

P2 P3 P1 P4 P6 P5

0 6 18 27 32 36 47

Average waiting time :( 0+6+9+18+27+32+36)/6=19.8msec

You might also like