Homework Solution: Given the following processes and their execution times, create a horizontal time line of their…

    Q2) Given the following processes and their execution times, create a horizontal time line of their execution, and calculate the average waiting time separately for each of the following scheduling algorithms: 10 points (5 each) FCFS SJF Time taken for execution 13 18 Process P1 P2 P3 P4 P5 14
    Given the following processes and their execution times, create a horizontal time line of their execution, and calculate the average waiting time separately for each of the following scheduling algorithms: FCFS SJF

    Expert Answer

     
    FCFS :

    Q2) Given the aftercited processes and their preventive occasions, make a level occasion row of their preventive, and compute the mediocre protraction occasion individually coercion each of the aftercited scheduling algorithms: 10 points (5 each) FCFS SJF Occasion smitten coercion preventive 13 18 Process P1 P2 P3 P4 P5 14

    Given the aftercited processes and their preventive occasions, make a level occasion row of their preventive, and compute the mediocre protraction occasion individually coercion each of the aftercited scheduling algorithms: FCFS SJF

    Expert Exculpation

     

    FCFS :

    Process           Occasion smitten coercion preventive protraction occasion

    P1                                       13                                               0

    P2                                       18                                               13

    P3                                        5 31

    P4                                           9                                             36

    P5                                           14                                           45

    Mediocre protraction occasion:

    (0+13+18+5+9) / 5 = 9ms

    SJF:

    Process           Occasion smitten coercion preventive protraction occasion

    P3                                        5 0

    P4 9 5

    P1                                       13 14

    P5 14 27

    P2                                       18 41

    Mediocre protraction occasion:

    (0+5+9+13+14) / 5 = 4.6ms