Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Operating System Example: An execution of program 1 produces a process tree, an output, and process identifier assignment as shown in Figure 1. The parent

image text in transcribedimage text in transcribedimage text in transcribed

Operating System

Example: An execution of program 1 produces a process tree, an output, and process identifier assignment as shown in Figure 1. The parent process identifier is assumed to have been assigned with an integer 21, while the child is assigned with the next available identifier ie 22. program 1 Figure 1: Process tree of program 1 Q1: Draw a process tree (as in Figure 1) to illustrate parent-child relationship for the C code given in program 2. For each node on the tree, write the following information: i. The process identifier (assumed that the parent process identifier is assigned with an integer 21). ii. The return value of the fork 0 statement iii. Generated output Q2: Referring to Figure 2, write a program that will create five processes called original, clone1, clone2, clone3, and clone4. Each process displays message that illustrate the parent - child/children relationship between two processes. i. Process original will print an output as follows: (8 points) (2.5 points) "I am the original process, my process identifier is id of original, my clones are: process clone1: id_of_clonel process clone3;id_of_clone 33" ii. Process clonel will print an output as follow: (1.5 points) "I am the obsolete version, recent version is id_of_clone 2 " Process clone4 will print the following message: (1.5 points) "I am the most sophisticated clone, process identifier of my parent is id_of_clone 3" Write down your code on the space provided. Compile your code on Linux environment and determine the identifier of the following processes by fill in the following blanks: (0.5 point each) a. original process b. clonel process c. clone 2 process d. clone 3 process e. clonet process

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

More Books

Students also viewed these Databases questions