There are five processes: P1, P3, P5, P7, and P8. Assume at time 5, no system resources are being used except for the processor and memory. Now consider the following events: At time 5: P1 executes a command to read from disk unit 3. At time 15: P5's time slice expires. At time 18: P7 executes a command to write to disk unit 3. At time 20: P3 executes a command to read from disk unit 2. At time 24: P5 executes a command to write to disk unit 3. At time 28: P5 is swapped out. At time 33: An interrupt occurs from disk unit 2: P3's read is complete. At time 36: An interrupt occurs from disk unit 3: P1's read is complete. At time 38: P8 terminates. At time 40: An interrupt occurs from disk unit 3: P5's write is complete.
(1) At time 22, the states of the processes are:
P1: Blocked (reading from disk unit)
P3: Running (executing a command to read from disk unit 2)
P5: Running (its time slice expired)
P7: Blocked (writing to disk unit 3)
PB: Not specified (not mentioned in the events)
(2) At time 37, the states of the processes are:
P1: Blocked (reading from disk unit)
P3: Running (its read from disk unit 2 is complete)
P5: Swapped Out (it was swapped out at time 28)
P7: Blocked (writing to disk unit 3)
PB: Not specified (not mentioned in the events)
(3) At time 47, the states of the processes are:
P1: Blocked (reading from disk unit)
P3: Running (its read from disk unit 2 is complete)
P5: Swapped In (it was swapped back in at time 44)
P7: Unblocked (its write to disk unit 3 is complete)
PB: Not specified (not mentioned in the events)
The event on which each process is blocked:
P1 is blocked on the event of reading from disk unit
P7 is blocked on the event of writing to disk unit 3
Trending now
This is a popular solution!
Step by step
Solved in 2 steps