Open In App

Aptitude | GATE CS 1998 | Question 81

Last Updated : 13 Oct, 2017
Like Article
Like
Save
Share
Report

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

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.

  • if x<3<5<6 then order: x, 3, 5, 6
  • if 3<x<5<6 then order: 3, x, 5, 6
  • if 3<5<x<6 then order: 3, 5, x, 6
  • if 3<5<6<x then order: 3, 5, 6, x

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


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads