in Operating System recategorized by
2,542 views
0 votes
0 votes

The process executes the following code and after execution ______ number of child process get created

fork();
fork();
fork();
fork();
  1. $4$
  2. $1$
  3. $15$
  4. $16$
in Operating System recategorized by
by
2.5k views

1 Answer

2 votes
2 votes
Number of child processes created when number of fork() calls are n = $2^{n}$-1

Here, number of times fork() is invoked = 4

So total number of child processes = $2^{4}$-1 = 15
Answer: