Question:medium

Arrange the steps in process state transition.
• [(i)] Running
• [(ii)] Ready
• [(iii)] New
• [(iv)] Waiting

Show Hint

A simple way to remember the process lifecycle is: \[ \text{New} \rightarrow \text{Ready} \rightarrow \text{Running} \rightarrow \text{Waiting} \] Think of it as: Created $\rightarrow$ Waiting for CPU $\rightarrow$ Executing $\rightarrow$ Waiting for Resource.
  • (i) $\rightarrow$ (ii) $\rightarrow$ (iii) $\rightarrow$ (iv)
  • (iii) $\rightarrow$ (ii) $\rightarrow$ (i) $\rightarrow$ (iv)
  • (iv) $\rightarrow$ (i) $\rightarrow$ (ii) $\rightarrow$ (iii)
  • (ii) $\rightarrow$ (i) $\rightarrow$ (iii) $\rightarrow$ (iv)
Show Solution

The Correct Option is B

Solution and Explanation


Step 1:
Identifying the initial state. Whenever a user starts a program, the operating system first creates a process and allocates a Process Control Block (PCB). At this stage, the process enters the New state. Therefore, the first state is: \[ (iii)\ \text{New} \]

Step 2:
Moving to the Ready state. After creation, the operating system loads the necessary information into memory and places the process in the ready queue. The process is now ready to execute but is waiting for CPU allocation. Thus, the next state is: \[ (ii)\ \text{Ready} \]

Step 3:
Transitioning to Running state. The CPU scheduler selects one process from the ready queue and assigns the CPU to it. The process now starts executing instructions. Hence, the process enters: \[ (i)\ \text{Running} \]

Step 4:
Transitioning to Waiting state. While executing, the process may need to perform an I/O operation such as:
• Reading a file
• Receiving network data
• Waiting for keyboard input During this period, the process cannot continue execution and enters the Waiting (Blocked) state. Thus, the next state becomes: \[ (iv)\ \text{Waiting} \]

Step 5:
Constructing the correct sequence. Combining all transitions: \[ \text{New} \rightarrow \text{Ready} \rightarrow \text{Running} \rightarrow \text{Waiting} \] or \[ (iii)\rightarrow(ii)\rightarrow(i)\rightarrow(iv) \] Hence, the correct answer is: \[ {\text{Option (B)}} \]
Was this answer helpful?
0


Questions Asked in Karnataka PGCET exam