1,823 views
0 0 votes
Consider a process P1 that is executing on a Linux-like OS on a single core system. When P1 is executing, a disk interrupt occurs, causing P1 to go to kernel mode to service that interrupt. The interrupt delivers all the disk blocks that unblock a process P2 (which blocked earlier on the disk read). The interrupt service routine has completed execution fully, and the OS is just about to re- turn back to the user mode of P1. At this point in time, what are the states (ready/running/blocked) of processes P1 and P2 ?

1 Answer

0 0 votes
2? As its mentioned tht OS is returning to P1, also P1 was preempted for sys call so it will go to ready not blocked, since P2 executed and returning the ctrl so it will go from running to terminated
Position:
Show:

Related questions

0 0 votes
1 1 answer
830
830 views
Balaji Jegan asked Oct 16, 2018
830 views
A printf or malloc takes the process to what state?RunningReadySuspendedTerminated
0 0 votes
2 2 answers
738
738 views
Sourin Kundu asked Jan 24, 2023
738 views
A process executes the following segment of code: int main(){fork();fork() && fork();}The number of new processes created is
0 0 votes
1 1 answer
3.9k
3.9k views
Chetan Warke asked Nov 17, 2018
3,934 views
The first known correct software solution to the critical-section problemfor two processes was developed by Dekker. The two processes, P0 andP1, share the following varia...
1 1 vote
1 1 answer
1.1k
1.1k views
Hradesh patel asked Nov 14, 2016
1,136 views
Q. A process spends 25% of its time waiting for I/O to complete. if 3 process in memory at a time, then the probability of CPU utilized(assume all I/O process are overlap...