Question

We have two jobs A and B. The execution pattern for A is CPU first IO...

We have two jobs A and B. The execution pattern for A is CPU first IO next, and of B IO first CPU next. Each one needs CPU time of 40mn. The IO time of A is 50% of total execution time of A. Likewise for B. Ignore context switch time or initial program load time (assume that it is zero). Total execution time is defined to be CPU time plus IO time. The unit mn stands for minute.

(a) Serial execution. What is the elapsed time (i.e. turnaround time) of A? What is it of B? Assume that A arrives ’ahead’ of B at the same time with B. What is the CPU utilization when the jobs are done? (Express it as a percentage.)

(b) Multiprogramming. Assuming that both arrive at the same time, what is the elapsed time of A? What is it of B? What is the CPU utilization (percentage) ?

(c) Multitasking (timesharing) with slice of 20mn. Multiprogramming is not available. Assuming that both arrive at the same time but A has a slightly faster arrival. What is the elapsed time of A? Of B? CPU utilization (percentage)?

(d) Multitasking (timesharing) with slice of 1mn. Multiprogramming is not available. Assuming that both arrive at the same time but A has a slightly faster arrival. What is the elapsed time of A? Of B? CPU utilization?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Gievn both have the IO time of A is 50% of total execution time and cpu time is 40 mn which means io time is also 40 mn.

a) Serial Execution: First the A job will finish first and then B job.

Turn around time for A = 80mn and for B = 160mn.

CPU utilization : In first 80 mn cpu is used for 40 min and from 80 to 160mn it is again used for 40 mn. Which gives us 50% cpu utilization.

b) Multiprogramming : Initiall A uses cpu while B uses io for first 40 mn and then for next 40 mn A uses io and B uses cpu. which gives us time used for both A and B as 80 mn and cpu utilization of 100%

c) Multitasking( no multiprogramming, time slice of 20mn):

time cpu io
0-20 A -
20-40 - B
40-60 A -
60-80 - B
80-100 - A
100-120 B -
120-140 - A
140-160 B -

Cpu utilization = 50 %

turn around A=140,B=160

d) This part is similar to c)

cpu utilization = 50%

turn around time for A=159mn

B=160mn

Add a comment
Know the answer?
Add Answer to:
We have two jobs A and B. The execution pattern for A is CPU first IO...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 2. The following processes have 4 CPU burst and 3 I/O bursts each. They are all...

    2. The following processes have 4 CPU burst and 3 I/O bursts each. They are all of the same priority and they arrive in the order P1, P2, P3 at time 0 CPUO 10 CPU 10 CPUI/O 10 CPU 10 10 10 P1 P2 P3 10 10 10 a. Draw three Gantt charts illustrating the execution of these processes using FCFS, SJF, and RR (quantum- 1t) scheduling b. What is the turnaround time of each process for each of the...

  • Assume that you have four different processes with the following attributes: Process   Arrival time.   CPU Burst....

    Assume that you have four different processes with the following attributes: Process   Arrival time.   CPU Burst.   I/O Burst Total CPU time A. 0 4 4 9 B 3 2 3 7 C 6 5 1 11 D 12 1 1 5 As we did in class, perform a scheduling simulation using these four processes according to the following algorithms: 1) First Come First Serve 2) Round Robin with time slice = 1 3) Round Robin with time slice = 3...

  • 1 - [30 pts] Scheduling Algorithms Comparison Assume that we have 5 independent and aperiodic tasks...

    1 - [30 pts] Scheduling Algorithms Comparison Assume that we have 5 independent and aperiodic tasks (T1, ... , Ts) and they arrive to the system at times indicated below. Each task will run for the amount of execution time listed and is assigned a priority ranging from 0 (highest) to 10 (lowest), i.e. lower value means higher priority. There are no other tasks scheduled to arrive to the system until T1, ... , Ts complete. Task Arrival Time Execution...

  • please urgent help needed lakt time measure which b. I Discussion Questions ( Why Is It...

    please urgent help needed lakt time measure which b. I Discussion Questions ( Why Is It portant to look a formance, as measured by average Inventory avera e gate flow pe flow time, and average throughput? 3.2 Discuss why it is often easier to measure average inventory and average throughput rather than aver- age flow time How can a manager determine the minimal set of operational measures that should be tracked on a daily basis to predict the financial performances...

  • All of the following questions are in relation to the following journal article which is available...

    All of the following questions are in relation to the following journal article which is available on Moodle: Parr CL, Magnus MC, Karlstad O, Holvik K, Lund-Blix NA, Jaugen M, et al. Vitamin A and D intake in pregnancy, infant supplementation and asthma development: the Norwegian Mother and Child Cohort. Am J Clin Nutr 2018:107:789-798 QUESTIONS: 1. State one hypothesis the author's proposed in the manuscript. 2. There is previous research that shows that adequate Vitamin A intake is required...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT