CS FundamentalsModerateGATE CS
A parent process exits without calling wait() while its child is still running. What happens to the child?
- A. It becomes an orphan and is adopted by init (or a subreaper), which later reaps it
- B. It is immediately killed by the kernel
- C. It becomes a zombie at once
- D. It keeps running but can never terminate
Correct answer: A. It becomes an orphan and is adopted by init (or a subreaper), which later reaps it
An orphan is re-parented to init/systemd (or a designated subreaper), which calls wait() on it when it exits. A zombie is the opposite case: a dead child whose parent has not yet waited.
More Operating Systems questions
- After a successful exec() call, which of these is preserved from the calling process?
- Disk cylinders 0–199; the head is at 50. Requests in arrival order: 82, 170, 43, 140, 24, 16, 190. What is the total head movement under…
- Disk cylinders 0–199; head at 50, moving toward 199. Requests: 82, 170, 43, 140, 24, 16, 190. What is the total head movement under SCAN…
- Disk cylinders 0–199; head at 50, moving toward 199. Requests: 82, 170, 43, 140, 24, 16, 190. Under C-SCAN, counting the return sweep from…
- Disk cylinders 0–199; head at 50, moving toward 199. Requests: 82, 170, 43, 140, 24, 16, 190. Under C-LOOK, counting the jump from the…
- Disk cylinders 0–199; head at 100, moving toward higher cylinders. Requests: 55, 58, 39, 18, 90, 160, 150, 38, 184. Which algorithm gives…