retagged by
1,020 views

3 Answers

4 votes
4 votes

Total no. of child process = 2n-1

                                          = 25-1 = 31

and 1 parent process ..

Total processes = 31 + 1 = 32

2 votes
2 votes
for each fork call two processes are created , one is parent and other is child

fork() returns pid which can be negative: unsuccessful

it returns +ve pid (process id of child process) to the parent process and pid=0 to the newly created child process.
0 votes
0 votes
Find total no. Of child is 2^n-1

then 2^5-1=31

And one parent process also add

That's why answer is 31+1=32

Related questions

670
views
0 answers
0 votes
413
views
1 answers
0 votes
admin asked Jan 5, 2019
413 views
Consider the following program.#include<stdio.h #include<stdlib.h #include<unistd.h int main(void) { pid_t pid; int varl = 100; pid = fork(); if(pid == 0) /* Ch...
4.0k
views
2 answers
2 votes
aditi19 asked Jun 12, 2019
3,974 views
Consider the code fragment: count = 3;S1;Fork L1; L1: S3; S2; goto L3;S4;Fork L2; L2: S6; goto L3;S5; L3: join countS7...
2.4k
views
1 answers
3 votes