Question Type: General Knowledge (Operating Systems)
Step-by-Step Logic:
- An operating system manages the allocation and deallocation of memory to processes.
- A process goes through different states during its lifetime: Ready, Running, Sleeping (or Blocked), and Terminated.
- When a process is in the Ready state, it is waiting for its turn to use the CPU. Memory is still allocated.
- When a process is Running, it is actively using the CPU. Memory remains allocated.
- A process moves to the Sleeping state when it needs to wait for an event (like I/O). Memory is retained.
- Only when a process transitions to the Terminated state does the operating system completely release all the memory the process was using. This frees up system resources.
Core Logic/Pattern: The key understanding here is the lifecycle of a process and memory management within an operating system. Memory deallocation is final and happens only upon process termination.
Eliminate Incorrect Options:
- Sleeping to ready: The process remains in memory.
- Ready to running: Memory remains allocated.
- Running to sleeping: Memory is still held.
Therefore, the correct answer is "Running to terminated."