Question

In: Computer Science

Assume there are three processes A, B and C. All processes are submitted for execution at...

Assume there are three processes A, B and C. All processes are submitted for execution at the same time. The process A executes for 2 milliseconds and then does I/O for 3 milliseconds and then executes for 3 milliseconds more. The process B executes for 4 milliseconds and then does I/O for 7 milliseconds. The process C executes for 2 millisecond and then does I/O for 4 milliseconds. Assume no contention for the resources and the order of execution (priority) is A, B and C.

Assume that the computer system has 512 Mbytes of available memory. What is the memory utilization with multiprogramming if Process A requires 256 Mbytes, Process B requires 128 Mbytes and Process C requires 64 Mbytes of memory. Note that: all processes are submitted for execution at the same time.

Solutions

Expert Solution

Process CPU (in milliseconds) I/O (in milliseconds)
A 2 + 3 = 5 3
B 4 7
C 2 4

Total execution time for three processes = (5 + 3 + 4 + 7 + 2 + 4) milliseconds = 25 milliseconds

Among the total time of 25 milliseconds, (5 + 4 + 2) milliseconds = 11 milliseconds will be utilized for CPU and the remaining (25 - 11) milliseconds = 14 milliseconds will be utilized for the I/O. This I/O interaction can't support multiprogramming, but the CPU interaction can support multiprogramming.

Process A can utilize ((256/512) * 100) % = 50% of the memory.

Process B can utilize ((128/512) * 100) % = 25% of the memory.

Process C can utilize ((64/512) * 100) % = 12.50% of the memory.

Total system memory = 512 MB

Memory requirement for all three processes = (256 + 128 + 64) MB = 448 MB

As the total required memory (448) < Available memory (512)

So, there will be enough memory to support multiprogramming for these three processes.

With multiprogramming the memory utilization will be ((448/512) * 100) % = 87.5%

For CPU operations we have,

Memory utilization = (utilization of all three processes * total CPU time of all three processes)

or, Memory utilization = (0.875 * 11)

or, Memory utilization = 9.625 seconds (the effective utilization time)

For I/O operations we have,

Memory utilization = (utilization of process A * I/O time of process A) + (utilization of process B * I/O time of process B) + (utilization of process C * I/O time of process C)

or, Memory utilization = (0.5 * 3) + (0.25 * 7) + (0.125 * 4)

or, Memory utilization = (1.5 + 1.75 + 0.5)

or, Memory utilization = 3.75 seconds (the effective utilization time)

So, the memory utilization with multiprogramming = (((9.625 + 3.75) / 25) * 100) % = ((13.375 / 25) * 100) % = 53.50 %

Please comment in case of any doubt.
Please upvote if this helps.


Related Solutions

Assume there are three processes A, B and C. All processes are submitted for execution at...
Assume there are three processes A, B and C. All processes are submitted for execution at the same time. The process A executes for 2 milliseconds and then does I/O for 3 milliseconds and then executes for 3 milliseconds more. The process B executes for 4 milliseconds and then does I/O for 7 milliseconds. The process C executes for 2 millisecond and then does I/O for 4 milliseconds. Assume no contention for the resources and the order of execution (priority)...
Suppose that the following processes arrive for execution at time 0 in the order A, B,...
Suppose that the following processes arrive for execution at time 0 in the order A, B, C: process Run Time Priority A 4 1=high B 2 3=low C 3 2=medium Determine the execution order (with the time marks) of these process using the following 4 schedulings: FCFS, SJF, a non-preemptive priority, and RR (time slice = 2). What is the waiting time of each process for each of the scheduling algorithm? Which scheduling algorithm achieves the shortest average waiting time?
What will be the values of A, B, C and D after execution of the following...
What will be the values of A, B, C and D after execution of the following procedure using the “Scores” dataset? Note: Consider fractions up to 2 decimal places e.g. 10 / 3 = 3.33, 20 / 3 = 6.67 Step 1. Arrange all cards in a single pile called Pile 1 Step 2. Maintain five variables A, B, C, D, percentage and initialize them to 0 Step 3. If Pile 1 is empty then stop the iteration Step 4....
There are A, B and C, three plastic balls, A and B, B and C, C...
There are A, B and C, three plastic balls, A and B, B and C, C and A are attracted to each other, if A is positive: Group of answer choices 1. Both B and C are negatively charged. 2. One of the B balls and the C balls is going to be negatively charged and the other one is not charged 3. B ball, C ball has no charge 4. B ball is negatively charged, C ball is positively...
Deadlock –Banker’s Algorithm A system has three resource types (A, B, C) and four processes {P1,...
Deadlock –Banker’s Algorithm A system has three resource types (A, B, C) and four processes {P1, P2, P3, P4 }. The total units of system resources are: (8, 5, 4) units of A, B and C, respectively. The maximum demands for each process is P1(1,2,3), P2(3,2,1), P3(6,5,4) and P4(4,4,2). The current allocation is: P1(0,1,1), P2(2,2,0) and P3(3,0,1) and P4(1,0,1). (a) Allocation table is given for the 3 processes with the following four columns: PROCESS, ALLOCATION, MAX and NEED. And fill...
Please answer all a,b,c,d!!! Assume calendar year-ends for all companies and that all errors are material....
Please answer all a,b,c,d!!! Assume calendar year-ends for all companies and that all errors are material. a. Quigley Down Under Co. bought a machine on January 1, 2017 for $1,400,000. The machine had an estimated residual value of $120,000 and a ten-year life. “Machine expense” was debited on the purchase date for $1,400,000. Quigley uses straight-line depreciation for all assets. The error was discovered on June 15, 2018 after the books had been closed for 2017. What journal entry (if...
Let’s say you are looking at three genes in elephants: A, B, and C. All are...
Let’s say you are looking at three genes in elephants: A, B, and C. All are on the same chromosome. There are two alleles of each, and all three show complete dominance. You cross 2 heterozygous individuals, and find the following: ABc 18 aBc 112 abc 308 ABc 66 abC 59 ABC 321 aBC15 AbC 102 total 1000 What would be the possible order of genes? What would happen if one of these genes was on a different chromosome that...
There are three assets A, B and C. The returns for shares A, B and C...
There are three assets A, B and C. The returns for shares A, B and C over the next year have expected values 9%, 6%, 5% respectively. The standard deviations for A, B and C are 30%, 25% and 20% respectively. The covariance between these A and B is 0.0375, the covariance between A and C is -0.018, the covariance between B and C is -0.03. Ben currently has invested 40%, 40%, 20% in shares A, B and C respectively....
There are three assets A, B and C. The returns for shares A, B and C...
There are three assets A, B and C. The returns for shares A, B and C over the next year have expected values 10%, 5%, 3% respectively. The standard deviations for A, B and C are 30%, 25% and 20% respectively. The covariance between these A and B is 0.0375, the covariance between A and C is -0.018, the covariance between B and C is -0.03. Ben currently has invested equal amounts of his portfolio in shares A, B and...
Find all triples of a, b, c satisfying (a, b, c) = 10 and [a, b,...
Find all triples of a, b, c satisfying (a, b, c) = 10 and [a, b, c] = 100 simultaneouly
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT