The GATE Grind

GATE 2012 CS (CS1) – Question 18

Operating System · System Calls, Processes, Threads and IPC · 1 mark · Multiple choice

A process executes fork(); fork(); fork();. How many child processes are created?

  1. 3
  2. 4
  3. 7
  4. 8

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: (C) 7

Explanation

Every successful fork doubles the number of active processes, so three successive calls across all descendants produce 2³=8 total processes. Excluding the original parent leaves seven children, C. This assumes all forks succeed.

More System Calls, Processes, Threads and IPC questions

All System Calls, Processes, Threads and IPC questions →