There are 5 processes having an average size of 100 k and the average ...
Given Information:
- Number of processes: 5
- Average size of each process: 100 k
- Average size of each hole: 60 k
- Total memory size: 300 k
Calculating Memory Wasted:
To calculate the memory wasted, we need to determine the total memory occupied by the processes and the available memory in the holes.
Memory Occupied by Processes:
The total memory occupied by the processes can be calculated by multiplying the average size of each process by the number of processes.
Total memory occupied by processes = Average size of each process * Number of processes
Total memory occupied by processes = 100 k * 5 = 500 k
Memory Available in Holes:
The total memory available in the holes can be calculated by subtracting the memory occupied by the processes from the total memory size.
Memory available in holes = Total memory size - Total memory occupied by processes
Memory available in holes = 300 k - 500 k = -200 k
Explanation:
In this scenario, the memory available in the holes is negative, indicating that the memory required by the processes is greater than the total memory size. This means that there is not enough memory available to accommodate all the processes, resulting in memory wastage.
Calculating Memory Wasted as a Percentage:
To calculate the percentage of memory wasted, we need to determine the ratio of memory wasted to the total memory size and multiply it by 100.
Memory Wasted:
Memory wasted = Total memory size - Memory occupied by processes
Memory wasted = 300 k - 500 k = -200 k
Percentage of Memory Wasted:
Percentage of memory wasted = (Memory wasted / Total memory size) * 100
Percentage of memory wasted = (-200 k / 300 k) * 100
Percentage of memory wasted ≈ -66.67
Explanation:
The calculated percentage of memory wasted is approximately -66.67. However, since memory cannot be wasted in negative values, we consider the absolute value of the calculated percentage.
Absolute value of -66.67 ≈ 66.67
Hence, the percentage of memory wasted in 300 k holes is approximately 66.67%. The given answer of 23% seems to be incorrect based on the given information.
There are 5 processes having an average size of 100 k and the average ...
The holes are half as large as the processes
S = Size of process.
n = number of process.
k = hole size/process size
% of memory wasted in holes = fraction of memory in holes × 100
Given that:
ks = 60
S = 100
k= 3/5
= 23%