CS FundamentalsHardGATE CS
After a successful exec() call, which of these is preserved from the calling process?
- A. The code, data and stack segments
- B. The signal handlers installed with signal()
- C. The process ID and (by default) open file descriptors
- D. The heap allocations made with malloc
Correct answer: C. The process ID and (by default) open file descriptors
exec replaces the address space (code, data, heap, stack) and resets caught signal handlers to default, but the PID stays the same and file descriptors without close-on-exec remain open.
More Operating Systems questions
- 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…
- Under SSTF, which situation can make a request wait indefinitely?