187 views
2 2 votes

Consider a single-CPU system with processes $A$, $B$, and $C$.

The following events have occurred:

  1. $A$ begins execution.
     
  2. $A$ creates $B$, and $B$ is scheduled.
     
  3. The running process requests disk I/O.
     
  4. The running process creates $C$, but $C$ is not yet scheduled.
     
  5. The time slice of the running process expires, and $C$ is scheduled.
     

Immediately after Step $5$, what are the states of $A$, $B$, and $C$ respectively?

  1. $A:$ RUNNING, $B:$ BLOCKED, $C:$ READY
     
  2. $A:$ READY, $B:$ BLOCKED, $C:$ RUNNING
     
  3. $A:$ BLOCKED, $B:$ READY, $C:$ RUNNING
     
  4. $A:$ READY, $B:$ RUNNING, $C:$ BLOCKED

1 Answer

2 2 votes

At Step $2$, $B$ is scheduled while $A$ becomes ready.

$B$ subsequently issues the disk I/O request, so $B$ becomes BLOCKED.

$A$ resumes execution and creates $C$. $C$ initially enters the ready state.

When $A$'s time slice expires and $C$ is scheduled:

  • $A$ becomes READY
     
  • $B$ remains BLOCKED, since its I/O has not yet completed
     
  • $C$ becomes RUNNING
     

Answer : B

Answer:
Position:
Show:

Related questions

7 7 votes
1 1 answer
247
247 views
GO Classes asked Jul 18
247 views
According to the standard process-state model, which of the following transitions are valid?A RUNNING process may move to the WAITING state when it blocks for an event su...
4 4 votes
1 1 answer
298
298 views
GO Classes asked Jul 18
298 views
Which of the following statements are correct?The CPU dispatcher determines the policy for which process should be run and when. With cooperative multitasking, it is poss...
5 5 votes
1 1 answer
225
225 views
GO Classes asked Jul 18
225 views
A single-CPU system contains three processes with priorities:$$X Y Z$$The scheduler always runs the highest-priority runnable process and performs preemption when neces...
4 4 votes
1 1 answer
187
187 views
GO Classes asked Aug 26
187 views
Which of the following events may cause a process $\text{P}$ to move from the running state to the blocked state?$\text{P}$ attempts to read a file. $\text{P}$'s CPU time...