Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Five batch jobs A through E, arrive at a computer center at almost the same time

ID: 671141 • Letter: F

Question

Five batch jobs A through E, arrive at a computer center at almost the same time. They have estimated running times of 10, 4, 2, 6, and 8 minutes. Their (externally determined) priorities are 3, 5, 4, 2, and 1, respectively, with 5 being the highest priority. For each of the following scheduling algorithms, determine the average process turnaround time. Ignore process switching overhead.

(a) Round robin.
(b) Priority scheduling.
(c) First-come, first-served (run in order 10, 4, 2, 6, 8).
(d) Shortest job first.

For (a), assume that the system is multi-programmed, and that each job gets its fair share of the CPU. For (b) through (d) assume that only one job at a time runs, until it finishes. All jobs are completely CPU bound.

Explanation / Answer

round robin : every process gets a time share of the CPU one at a time.it depends on the time slice of the CPU

2.) priority : the process with highest priority get the first chance of the CPU so B enters take 4 next C enters takes 2 next A enters takes 10next E enteres takes 8. so the average waiting time is 22.

3)FCFS the avaerage waiting time is 22 for this also. first A 10 then B 4 then C 2 then D 6 then E 8 hence it is 22.

4)SJF the average waiting time is 20 for this as the C takes first 2 then B 4 then D 6 then E 8 then A 10