789 views
0 votes
0 votes

Write a program to create a process tree as shown in Figure#1 and print the process
identifiers in Inorder traversal form. The height(depth) of the tree is a command line
argument. The program should create simultaneously executing processes in the same
level as quickly as possible before child’s execution starts. Each process should print its
process identifier and its parent process identifier by using the function getpid() and
getppid() respectively. Your program should not create an orphan process while execution .The parent process should also print the exit status of its child processes.

Capture

Please log in or register to answer this question.

Related questions

1 votes
1 votes
1 answer
2
FaisalSyed asked Mar 16, 2023
298 views
Does Waiting Time and Response TIme remains the same in Preemptive Scheduling Algorithm???