Question: How many unique processes and threads are created in the following program segment? pid_t pid; pid = fork(); if (pid == 0) { /* child
pid_t pid;
pid = fork();
if (pid == 0)
{
/* child process */
fork();
thread.create(…);
}
else
{
/* parent process */
fork();
thread.create(…);
}
fork();
Step by Step Solution
There are 3 Steps involved in it
In this program segment multiple fork calls and a threadcreate call are made in both the child and p... View full answer
Get step-by-step solutions from verified subject matter experts
