in Operating System edited by
537 views
1 vote
1 vote

Assume that a certain process executes the following code segment.

for (i =0, i <=8, i++ )
fork() ;

The number of new processes created is _______

in Operating System edited by
by
537 views

1 Answer

1 vote
1 vote
Here fork is called 9 times, hence number of child process created is (2^9 - 1) = 512 -1= 511

4 Comments

@bad

use this formula here 2n - 1

and subtract 1 for root node. think it like a full binary tree. 

read https://www.quora.com/If-fork-system-call-is-called-n-times-then-how-many-childs-are-created

0
0
I meant the question doesn't say child process it says new process so why root node(parent node) is not inlcuded???
0
0
new process means child process , if not stated. It is taken this way only.
0
0
Answer:

Related questions