Open In App

Aptitude | GATE CS 1998 | Question 81

Answer the following: a. Four jobs are waiting to be run. Their expected run times are 6, 3, 5 and x. In what order should they be run to minimize the average response time? b. Write a concurrent program using par begin – par end to represent the precedence graph shown below. 

Precedence graph


(A)

No Option provided (Subjective Question)
Please click here for answer.

Answer: (A)
Explanation:



a. If we use Round Robin with Time Quantum = 1, it will take minimum Response Time, but we will not get any specific order. So, SJF (Shortest Job First) will give a minimum response time.

b. 

Begin
     S1;
     Par Begin
            S3;
            Begin
                  S2;
                  S3;
            End
     Par End
     S5;
End

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :