Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1. Let Z denote the number of zombie processes in a systenm, let R denote the number of runnable processes in the same system
Problem 1. Let Z denote the number of "zombie processes in a systenm, let R denote the number of runnable processes in the same system (including those that are "sleeping"), let f denote the number of times fork() has been successfully called (by any process), and let w denote the total number of times wait() has been called and returned) successfully. (For the purposes of this problem, consider waitpid, wait, and any system call that reaps to be all the same, i.e., w counts all of them.) Give an argument that the following formula is invariant, i.e., always true: R+Z = f-w+1 Hint: Show that the formula holds at boot time, when the first process is created by system initialization code before there are any other processes. Then show that the equality is preserved by each call to fork(), wait(), and exit()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started