Ask Question

Given the information below, calculate the average waiting time using FCFS scheduling.

Process Burst Time Arrival Time

P1 24 0

P2 3 10

P3 3 3

P4 10 5

+2
Answers (2)
  1. 7 February, 15:53
    0
    20.25ms

    Explanation:

    Given

    Process - Burst Time - Arrival Time

    P1 - 24 - 0

    P2 - 3 - 10

    P3 - 3 - 3

    P4 - 10 - 5

    Using the burst time, we'll first create the Gantt chart for the above process.

    The Gantt chart is as follows

    P1 ... P2 ... P3 ... P4

    0 ... 24 ... 27 ... 30 ... 33

    Hence, waiting time for P1 will be 0

    P1 requires 24 ms for completion, hence waiting time for P2 will be 24 ms

    Similarly, waiting time for process P3 will be execution time of P1 + execution time for P2, which will be (24 + 3) ms = 27 ms.

    For process P4 it will be the sum of execution times of P1, P2 and P3, which is 30.

    The average weight time is then calculated as follows:

    (0 + 24 + 27 + 30) / 4

    = 81/4

    = 20.25 ms
  2. 7 February, 16:05
    0
    Average waiting time=17.5.

    Explanation:

    First Come First served (FCFS) : - In this algorithm of CPU scheduling the processes are queued in the order of their arrival. The process the arrived first will be the first one to be executed. Since P1 arrived first so it will be executed first and it's waiting time is 0 and it needs 24 time units to get completed.

    The next process to arrive is P3 it arrives at 3 time units when P1 still needed 21 time units to get completed. So P3 waited for 21 time units.

    The next process to arrive is P4 at 5 time units. But at that time P1 was executing and P3 was already in the queue. So it has to wait for 22 seconds 19 time units for P1 to get executed and 3 time units for P3.

    At last P4 arrived at 10 time units so it has to wait for 27 time units. 14 time units of P1,3 of P3 and 10 for P4.

    So waiting time are as following:-

    P1 = 0

    P2=27

    P3=21

    P4=22

    Average waiting time = (0+27+21+22) / 4=17.5.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Given the information below, calculate the average waiting time using FCFS scheduling. Process Burst Time Arrival Time P1 24 0 P2 3 10 P3 3 ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers