GATE - 2007 | OS | Consider n jobs J1, J2,......Jn such that job Ji has execution time

GATE - 2007 | OS | Consider n jobs J1, J2,......Jn such that job Ji has execution time
Posted on 16-02-2022

GATE - 2007 [Operating System]

Question:

Consider n jobs J1, J2,......Jn such that job Ji has execution time ti and a non-negative integer weight wi. The weighted mean completion time of the jobs is defined to be 

Consider n jobs J1, J2,......Jn such that job Ji has execution time ti and a non-negative integer weight wi. The weighted mean completion time of the jobs is defined to be

where Ti is the completion time of job Ji. Assuming that there is only one processor available, in what order must the jobs be executed in order to minimize the weighted mean completion time of the jobs?

A

Non-decreasing order of ti

B

Non-increasing order of wi

C

Non-increasing order of witi

D

None-increasing order of wi/ti

  

Solution:

Option (D) is Correct.

Like OS concept, execute job which have more completiontime in 1 sec i.e.,

find wi/ti for every process then arrange it in the decreasing order.

So, we get complete time is minimum always.


So answer is the non-increasing order of wi/ti.

 

Thank You