Assume that at time t = 1 no system resources are being used except for the proc
ID: 3745655 • Letter: A
Question
Assume that at time t = 1 no system resources are being used except for the processor and memory. Now consider the following sequence of events:
(This isn’t meant to be a complete list of events during this time period)
At t = 4 P1’s time slice expires
At t = 10 P2 executes a command to read from disk unit 2
At t = 15 P3 is swapped out
At t = 17 P4 executes a command to read from disk unit 3
At t = 20 P5 is dispatched
At t = 25 P6 executes a command to read from disk unit 2
At t = 28 P5’s time slice expires
At t = 31 P1 is dispatched
At t = 33 an interrupt occurs from disk unit 2; P2’s read is complete
At t = 40 an interrupt occurs from disk unit 3; P4’s read is complete
At t = 42 P1 terminates
At t = 43 P3 is dispatched
For each of the following times: 21, 35, 44, identify which state each process is in. If a process is blocked further identify the event on which it is blocked.
Explanation / Answer
At t = 4 P1’s time slice expires
0 4
Above solt P1 process working in processor 0 4
At t = 10 P2 executes a command to read from disk unit 2
0 9 10 14
At t = 15 P3 is swapped out
0 9 10 14 15 16
At t = 17 P4 executes a command to read from disk unit 3
0 9 10 14 15 16 17 19
At t = 20 P5 is dispatched
0 9 10 14 15 16 17 19 20 24
At t = 25 P6 executes a command to read from disk unit 2
0 9 10 14 15 16 17 19 20 24 25 27
At t = 28 P5’s time slice expires
0 910 14 15 16 17 19 20 24 25 27 28 30
At t = 31 P1 is dispatched
0 9 10 14 15 16 17 19 20 24 25 27 28 30 31 32
At t = 33 an interrupt occurs from disk unit 2; P2’s read is complete
0 9 10 14 15 16 17 19 20 24 25 27 28 30 31 32 33 39
At t = 40 an interrupt occurs from disk unit 3; P4’s read is complete
0 9 10 14 15 16 17 19 20 24 25 27 28 30 31 32 33 39 40 41
At t = 42 P1 terminates
0 9 10 14 15 16 17 19 20 24 25 27 28 30 31 32 33 39 40 41 42
At t = 43 P3 is dispatched
0 9 10 14 15 16 17 19 20 24 25 27 28 3031 32 33 39 40 41 42 43 .....
At time 0-9 p1 process is executed at t=10 p2 start executing command and go to the disk unit 2
It accesses the secondary memory so it take time to execute at time t=15 p3 process come to the cpu and start execution.
After time t=17 process p4 stop execution of p3 process and execite the p4 process and read the data from the disk unit 3
P5 process dispatced at t=20 and execote tim3 t=24 after that p6 process is execute the command and read data from the disk unit 2.
At t=28 again p5 process is execiting at t=30 after that p1 process is dispatched at t=31 to t=32
At t = 33 an interrupt occurs from disk unit 2; P2’s read is complete time t=39
At t = 40 an interrupt occurs from disk unit 3; P4’s read is complete time t=41
At t = 42 P1 terminates After t = 43 P3 is dispatched and execute the commands.
At time t=21
The process p5 is executing commands
At time t=35
p2 process is reading data from the disk unit 2
At time t=44
p3 process is executing commands.
P1