Home » Operating Systems » Operating systems miscellaneous » Question

Operating systems miscellaneous

  1. A process executes the code
    fork ();
    fork ();
    fork ();
    The total number of child processes created is
    1. 3
    2. 4
    3. 7
    4. 8
Correct Option: C

A process executes the code and works as follows:
The number of child processes created = 2n – 1 = 23 – 1 = 8 – 1 = 7 where, n = 3 ∵ 3 fork () are executing.



Your comments will be displayed only after manual approval.