-
Scheduling
I am trying to solve a question about scheduling using Round Robin. I was able to answer most of the parts but I am badly stuck on two parts:
Code:
Quantum = 3 time units
Process arrival time = 0
CPU burst - 4 time units
I/O burst - 5 time units
CPU burst - 8 time units
I/O burst - 6 time units
CPU burst - 10 time units
I have to state the transitions it will go through and indicate if it is voluntary or not.
AND
If the process attempts a division by zero in the third time unit of the second CPU burst what change will it have on the lifetime of the process.
Please help me..
Thanx
Jules
-
Erm, what's the difficulty?
> CPU burst - 4 time units
4-3 = 1
Control released unvoluntarily
ditto for the other events
Then next time around its
1-3 = 0
Control released voluntarily (normal exit)
Lather, rinse and repeat until everything is at zero time remaining.
-
I knew it sounded silly...but I am just learning about it...what about the division by zero?? I dont get it
-
> CPU burst - 8 time units
Well it successfully subtracts 3 twice right - leaving 2
So in the 3rd pass, it will either use all two ticks and finish normally, or use <2 and divide-by-zero
Either way, it's game over for this thread.
As to whether zero-divide is voluntary or not, well that depends on your definitions
-
Okay....Im Dumb :( It says to assume that the process completes execution in the three CPU bursts. So is this what happens
CPU burst - 4 time units
1st time around -> involuntary (1 remaining)
2nd time around -> voluntary (0 remaining)
I/O burst - 5 time units
1st time around -> involuntary (2 remaining)
2nd time around -> voluntary (0 remaining)
CPU burst - 8 time units
1st time around -> involuntary (5 remaining)
2nd time around -> involuntary (2 remaining)
3rd time around -> voluntary (0 remaining)
I/O burst - 6 time units
1st time around -> involuntary (3 remaining)
2nd time around -> voluntary (0 remaining)
CPU burst - 10 time units
1st time around -> involuntary (7 remaining)
2nd time around -> involuntary (4 remaining)
3rd time around -> involuntary (1 remaining) ???? what happens
I am so sorry for this...pls forgive me...I really do feel stupid
So if it does a divide by zero then the process will not be able to complete execution???