Reputation: 31
I got this table for pre-emptive Shortest Job First
JOB ARRIVAL Burst
TIME Time
A 15 5
B 27 8
C 19 7
D 4 6
E 10 8
F 52 4
G 33 10
H 38 2
before G, there is 2 seconds before it perform, do i need to include that?
The table given in my answer using gantt chart is
D E E A A C C B B H G F
4 10 15 18 19 23 27 30 33 38 40 50 52
my question is, is it ok to include the waiting time before F arrives?
Upvotes: 1
Views: 1274
Reputation: 19158
Given your question,first of all I'd like to mention that you haven't mention that whether processes are evaluated on the basis of time-quantum which seems,but,can't be verified because of answer given in your textbook violating the time quanta concept too.
I doubt why the answer consists of two separate A process,if the given scheduling algorithm is Shortest Job First (SJF)
.
But,I'd like to write this answer. The Gantt chart for this process' list would be :-
|----| D | E | A | C | B | H | G |----| F |
0 4 10 18 23 30 38 40 50 52 56
So, the answer to your question is
"YES, WE WOULD HAVE TO CONSIDER THE TIME_GAP OF 2 UNIT(FROM 50 TO 52), AS THERE WON'T BE ANY PROCESS IN THE READY QUEUE TO GET SCHEDULED AT THAT TIME,AS ALL OTHER PROCESS WOULD HAVE EXECUTED FULLY IN THE GIVEN TIME."
Upvotes: 1