Westonci.ca offers fast, accurate answers to your questions. Join our community and get the insights you need now. Ask your questions and receive accurate answers from professionals with extensive experience in various fields on our platform. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

Reusing PCBs of destroyed processes instead of freeing up the data structures eliminates the overhead of dynamic memory management but is likely to use more memory. Assume the following: • . The number of processes to be created and destroyed over a period of time is 10,000. The average number of processes coexisting at any given time is 100. The maximum number of processes coexisting at any given time is 600. Allocating and freeing a PCB take the same amount of time.
Question 1: How many memory operations (allocate or free) will be performed without PCB reuse?
Question 2: How many PCBs will coexist in memory, on average, during the entire run without PCB reuse?

Sagot :

Answer:

Question 1.  A maximum of 600 PCBs will be needed, all of which will be freed at the end of the run. The total is 2*600 = 1,200 memory operations.

Explanation:

Since 100 processes will coexist at any given time, 100 PCBs will reside in memory on average.