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.

Calculate the processor utilization with multiprogramming.

Solutions

Expert Solution

Step 1: Given that, there are three processes A, B, C.

Process A executes for 2ms and then does I/O for 3ms then executes for 3ms.

Process B executes for 4ms and then does I/O for 7ms.

Process C executes for 2ms and then does I/O for 4ms.

Priority for execution is A,B,C.

Step 2: In a multiprogramming environment, when a process is in I/O, the OS will schedule another process to CPU for execution. Lets see the time line of the three processes in a multiprogramming environment:

Process/timeline 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Process A
Process B
Process C

The red color cells indicate process execution and the yellow cells indicate I/O.

Step 3: CPU Utilization = Time spent by CPU for execution / (Time spent by CPU for execution + CPU Idle time)

Here CPU idle time includes the time in which processes are only in I/O.

Time spent by CPU for execution = (2+3)+4+2 = 11ms

CPU Idle time = 9ms

Step 4: CPU Utilization = 11 / (11+9) = 0.55

Hence processor utilization with multiprogramming is 55%.


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?
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
Imagine the world has three countries: country A, B and C. They all have their own...
Imagine the world has three countries: country A, B and C. They all have their own currencies. Country A and B both have a flexible regime while country C has pegged its currency against country B. Using a demand and supply analysis, what would you expect to happen to the nominal exchange rate between country A and B if country A make some technological innovations and attracted investors from country B? There has been some bad economic news about country...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT