0% found this document useful (0 votes)
3 views2 pages

fcfs

The document presents a problem involving 5 processes with specified arrival and burst times, using the FCFS scheduling policy. It calculates the average waiting time as 3.2 units and the average turn around time as 5.8 units. A Gantt chart illustrates the scheduling and idle CPU time.

Uploaded by

maazarbab04
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

fcfs

The document presents a problem involving 5 processes with specified arrival and burst times, using the FCFS scheduling policy. It calculates the average waiting time as 3.2 units and the average turn around time as 5.8 units. A Gantt chart illustrates the scheduling and idle CPU time.

Uploaded by

maazarbab04
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Problem-02:

Consider the set of 5 processes whose arrival time and burst time are given below-

Process Id Arrival time Burst time

P1 3 4

P2 5 3

P3 0 2

P4 5 1

P5 4 3

If the CPU scheduling policy is FCFS, calculate the average waiting time and average turn around
time.

Solution-

Gantt Chart-
Here, black box represents the idle time of CPU.

Now, we know-

• Turn Around time = Completion time – Arrival time

• Waiting time = Turn Around time – Burst time

Process Id Exit time Turn Around time Waiting time

P1 7 7–3=4 4–4=0

P2 13 13 – 5 = 8 8–3=5

P3 2 2–0=2 2–2=0

P4 14 14 – 5 = 9 9–1=8

P5 10 10 – 4 = 6 6–3=3

Now,

• Average Turn Around time = (4 + 8 + 2 + 9 + 6) / 5 = 29 / 5 = 5.8 unit

• Average waiting time = (0 + 5 + 0 + 8 + 3) / 5 = 16 / 5 = 3.2 unit

You might also like