A process running on the CPU issues a read() system call to read data from disk. According to the formal five-state process model, what state transition occurs immediately?
ARunning → Ready, because the CPU is freed to serve another process
BRunning → Terminated, because the process cannot continue until I/O completes
CRunning → Waiting, because the process blocks until the I/O operation completes
DRunning → New, because the OS must reinitialize the process context
In the formal model, issuing an I/O request moves the process from Running to Waiting — it is blocked and ineligible for the CPU until the hardware delivers the result. It does not go to Ready (that would mean it's still eligible for dispatch) or Terminated (it still has work remaining). This transition is triggered by the process itself via the system call. When I/O completes, a hardware interrupt moves the process from Waiting back to Ready.
Question 2 Multiple Choice
What is the primary benefit of modeling processes as formal finite state machines rather than describing their behavior informally?
AIt allows processes to execute faster by reducing scheduling overhead
BIt eliminates the need for context switches between processes
CIt enables formal proof of correctness properties such as no starvation and mutual exclusion
DIt reduces the number of states a process occupies, simplifying implementation
The value of formalization is provability, not speed. Once behavior is expressed as a finite state machine with enumerated states and legal transitions, you can mathematically prove properties: 'a ready process will eventually be dispatched' (no starvation), 'two processes never run simultaneously on one CPU' (mutual exclusion). Without formalization, these are engineering hopes; with it, they become theorems.
Question 3 True / False
In the formal five-state process model, a running process can transition back to the ready state without completing its execution.
TTrue
FFalse
Answer: True
This transition — Running → Ready — occurs when the OS scheduler preempts a process before it finishes. In a time-sharing system, each process gets a time quantum; when the quantum expires, the scheduler interrupts the running process and moves it to ready so another process can run. This legal preemption transition is a fundamental mechanism of multiprogramming and is explicitly modeled in the formal state machine.
Question 4 True / False
In the formal five-state process model, a process in the waiting state transitions directly to the running state when its I/O operation completes.
TTrue
FFalse
Answer: False
When I/O completes, a hardware interrupt moves the process from Waiting to Ready — not directly to Running. The process must wait in the ready queue until the scheduler dispatches it. The CPU may be occupied by another process when the I/O finishes, so the newly unblocked process cannot immediately resume. The Ready state serves as the buffer from which the scheduler selects the next process to run.
Question 5 Short Answer
Why does the formal process model assign different actors (OS scheduler, the process itself, hardware interrupts) to control different state transitions? Why does this matter for correctness?
Think about your answer, then reveal below.
Model answer: Each transition has a specific trigger and owner: the scheduler controls dispatching (Ready→Running) and preemption (Running→Ready); the process controls blocking (Running→Waiting) via system calls; hardware controls unblocking (Waiting→Ready) via I/O completion interrupts. If two components could simultaneously claim authority over the same transition, they could disagree about a process's state, causing race conditions. Clear ownership of each transition is what makes the model formally analyzable and prevents components from corrupting each other's state.
Specifying who triggers each transition prevents ambiguity and race conditions. This is the bridge from informal OS intuition to rigorous systems design — it makes the question 'who changes this state and when' answerable without ambiguity.