Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The red is the answer I submitted and the teacher said I did it wrong. Please provide the correct answer and not the same as
The red is the answer I submitted and the teacher said I did it wrong. Please provide the correct answer and not the same as the red text!
2. Assume that at time 5 no system resources are being used except for the processor and memory and every process (1.3) is either in ready queue (ready to run) or at CPU. Now consider the following events: (Hints: if a process executes something, it is on CPU at the point, if a process going to do IO or create a process, it needs to give out CPU immediately, if a process is time-out, an event will occur and listed here.) At time 5: P. executes a command to read from disk unit 3. At time 20: Ps executes a command to read from disk unit 2. At time 33: An interrupt occurs from disk unit 2: Pa's read is complete. At time 36: An interrupt occurs from disk unit 3: Pi's read is complete. At time 48:P3 terminates At Time 52: P1 terminates For each time 22, 37, and 47, identify which state each process is in. If a process is blocked, further identify the event on which is it blocked. If the system is at time t = 22. At this time, we have 2 instructions At time 5: pl executes a command to read from disk unit 3. At time 20: P3 executes a command to read from disk unit 2. At time t = 22, both processes pl and p3 will be blocked for I/O. At time t = 37 we also have 2 instructions. 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. Now both processes have finished reading data from the respective disk units, meaning at this time both of them would be in the running state. If the system is at time t = 47, no new instructions have occurred between t = 37 and t = 47, meaning both P1 and P3 would still be in the running state. 2. Assume that at time 5 no system resources are being used except for the processor and memory and every process (1.3) is either in ready queue (ready to run) or at CPU. Now consider the following events: (Hints: if a process executes something, it is on CPU at the point, if a process going to do IO or create a process, it needs to give out CPU immediately, if a process is time-out, an event will occur and listed here.) At time 5: P. executes a command to read from disk unit 3. At time 20: Ps executes a command to read from disk unit 2. At time 33: An interrupt occurs from disk unit 2: Pa's read is complete. At time 36: An interrupt occurs from disk unit 3: Pi's read is complete. At time 48:P3 terminates At Time 52: P1 terminates For each time 22, 37, and 47, identify which state each process is in. If a process is blocked, further identify the event on which is it blocked. If the system is at time t = 22. At this time, we have 2 instructions At time 5: pl executes a command to read from disk unit 3. At time 20: P3 executes a command to read from disk unit 2. At time t = 22, both processes pl and p3 will be blocked for I/O. At time t = 37 we also have 2 instructions. 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. Now both processes have finished reading data from the respective disk units, meaning at this time both of them would be in the running state. If the system is at time t = 47, no new instructions have occurred between t = 37 and t = 47, meaning both P1 and P3 would still be in the running stateStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started