edited by
971 views
0 votes
0 votes

Consider the following code segment:

pid t pid;
pid = fork();
if (pid == 0) { /* child process */
fork();
thread create( . . .);
}
fork();

a. How many unique processes are created?
b. How many unique threads are created?

edited by

3 Answers

Related questions

0 votes
0 votes
1 answer
2
akash.dinkar12 asked Mar 19, 2019
3,943 views
Using Amdahl’s Law, calculate the speedup gain of an application that has a 60 percent parallel component for (a) two processing cores and (b) four processing cores.
0 votes
0 votes
1 answer
3
1 votes
1 votes
2 answers
4
akash.dinkar12 asked Mar 19, 2019
440 views
Can a multithreaded solution using multiple user-level threads achieve better performance on a multiprocessor system than on a single processor system ? Explain.