A process executes the following code
for(i=0; i<n; i++) fork();
The total number of child processes created is
Each fork() creates a child which start executing from that point onward. So, number of child processes created will be $2^n - 1$.
At each fork, the number of processes doubles like from $1 - 2- 4 - 8 ... 2^n$. Of these except $1$, all are child processes.
At each fork, the number of processes doubles like from 1 - 2- 4 - 8 ... 2n. Of these except 1, all are child processes.
found this really helpful Channel on YouTube ...
Arjun sir Good Morning,
i didn't get ...