Question: Proper includes and declarations have been made but not shown below ( pseudo - code ) . The size of an integer is 4 bytes
Proper includes and declarations have been made but not shown below pseudocode The size of an
integer is bytes and this of a character is byte. Based on the snippet below, investigate the following:
Q: Remove lines A and C altogether but keep B and D
Q: Remove lines B and D altogether but keep A and C
In Q and Q what are the final values of r r r r r r Are there orphans or zombies at the end?
int pipefd;
pidt res; size of res is bytes
char ch;
int r r r r r r r;
pipepipefd;
res fork;
if res
sleep; line A
r writepipefd&res,sizeofr;
sleep; line B
r writepipefd&rsizeofchar;
printfFinished;
r waitpid&status,WUNTRACEDWNOHANG;
sleep;
closepipefd
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
