Calculation of CPU Utilization Problem

23.3k Views Asked by At

A computer, has an operating system occupying 1GB of memory. The following are the processes with memory sizes and their I/O wait percentages: A(512MB, 50%), B(128MB, 60%), C(64MB, 70%). If the goal is at least 75% CPU utilization, what would be the minimum system memory size requirement? Give examples for how many process A,B, and C's should we run at the same time. (Show your formulas and work clearly, list all your assumptions if you have any)

The formula for CPU utilization is $1-p^{n}$, in which $n$ is number of process running in memory and p is the average percentage of time processes are waiting for I/O.

$$64 = x, 128 = 2x, 512 = 8x$$

$$0.25 = p^n$$

$$0.25 = 0.5*4x * 0.6*2x * 0.7*x$$

$$0.5 = 16x^3 * 0.42$$

For a limited time, I can't go further. Even if I have time, I don't go further. Is my approach is wrong? Is there any simpler way to find it? It is an exam question.

1

There are 1 best solutions below

2
On

Given that we have 3 types of processes as follows:

Process A : 512 MB with 50% Idle time
Process B : 128 MB with 60% Idle time
Process C : 64  MB with 70% Idle time

Now we have each of these as follows:

(Number of each of these processes) = x1 of A, x2 of B and x3 of C

We can calculate CPU Utilisation $\eta$ as follows:

$\eta$ = 1 - 0.5^x1 * 0.6^x2 * 0.7^x3

Now we need to play with x1, x2, x3 such as $\eta$ >= 0.75

(x1,x2,x3) = (1,0,2) results in 0.755 which is as close as you can come to 0.75 with x1,x2,x3 integer. -- (1)

with, (x1,x2,x3) = (1,1,1) utilisation comes out to be 0.79, hence result obtained in statement (1) is the closest you can reach atleast 75% CPU utilisation.

Now, with result obtained in (1), let's calculate system memory size M

M = x1* 512MB + x2* 128MB + x3*64MB + 1024MB (OS)

M = 512+2*64+1024 MB = 1664 MB = 1.625GB