The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
23 views

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?

asked in Operating System by Boss (40.9k points)
edited by | 23 views

2 Answers

+1 vote
process=6

threads created=2
answered by (101 points)
0 votes
8 threads and 6 processes.
answered by Active (1.2k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,808 questions
54,481 answers
188,249 comments
74,520 users