The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
33 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?

in Operating System by Boss (41.6k points)
edited by | 33 views

2 Answers

+2 votes
process=6

threads created=2
by (137 points)
0 votes
8 threads and 6 processes.
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
50,339 questions
55,763 answers
192,337 comments
90,771 users