c programing.. Write a C program that performs the following. a. Create 8 proces
ID: 3564027 • Letter: C
Question
c programing..
Write a C program that performs the following. a. Create 8 processes and stores the valve returned by fork( ) in a variable of type pid_ t, which is a special type for process ids. b. Add the appropriate statements to question a to perform the following tasks: a. Display and differentiate the ids of each child and its parents by testing separately your program using 2, 4. and 8 processes. b. Draw a child-parent tree for each data case and indicate the corresponding ids. c. For each data case. run your program 3 times and list (write down) the order in which processes compete for the CPU. d. Comment on anything you see when you run your program and you think it needs some explanation. e. Go back to question a and make the following changes: a. The parent process keeps displaying its id indefinitely. b. While the program is running. use ps (process status). You can use ps -f in another terminal and can you tell which process is the child and which is the parent. How? c. Explain each field displayed by this command.Explanation / Answer
C is the programming language which was developed in 1972 in AT and T bells laboratary by Dennis Richie
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.