225k views
11 votes
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?

User Savas
by
4.6k points

1 Answer

14 votes

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.

Step-by-step explanation:

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

User Fariba
by
4.1k points