Google
Information Storage and Retrieval: Optimize Your Time Wisely......

Pages

Thursday, October 11, 2007

Optimize Your Time Wisely......

There are 4 computer jobs which have to be run on 3 processors.Each job requires a certain amount of processor time, but is migratable i.e it can be started on one processor, suspended, continued on another processor, etc., as long as the total time it gets on processors is sufficient.
If the times required by these 4 jobs is 20 secs, 20 secs, 21 secs and 100 secs respectively , find out the maximum possible time for which all 3 processors can be kept busy with optimal scheduling. Also provide a general solution for this problem for 'n' processors where 'p' jobs have to be run which takes p1,p2,p3..... times to finish.

4 comments:

Anonymous said...

use anti-shortest-job-first algorithms of CPU scheduling(terminology just developed) with a time quanta of 1 sec ...
after every sec each processor will select the longest-remaining-time job to process from "what it have & what are in the queue" ...& this decision will take place one after another in a definite order of processor !!!

Gaurav Kant Goel said...

@Amar:What about this particular case? What is the answer for this? What u told was the application implementation. But how will you solve this?

Anonymous said...

for this problem ...!!!
Time Pro1 Pro2 Pro3 Wait
1 Job4-100 Job3-21 Job1-20 Job2-20
2 Job4-99 Job3-20 Job2-20 Job1-19
3 Job4-98 Job3-19 Job2-19 Job1-19
4 Job4-97 Job1-19 Job2-18 Job3-18
.........(these r the remaining time ...)
........... & so on
up to the end with the serial order
Pro1 -> Pro2 -> Pro3
........ !!!!!!!!

Gaurav Kant Goel said...

Its looking very weird to me. What is your final answer. I mean what is the maximum possible time for which all 3 processors can be kept busy with optimal scheduling???