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

2. (25 points) Five batch jobs A through D arrive at a computer center in the or

ID: 3735888 • Letter: 2

Question

2. (25 points) Five batch jobs A through D arrive at a computer center in the order A to D at almost the same time. They have estimated running times of 6, 5, 1, and 2 time units. Their (externally determined) priorities are 3, 5, 2, and 1, respectively, with 5 being the highest priority. For each of the following scheduling algorithms, determine the mean process waiting time. Ignore process switching overhead. Draw Gnatt charts to show your steps. (a) Round Robin ( assume quantum -1) (b) Priority scheduling (c) First-come first-served (d) Shortest job first For (a), assume that the system is multitasking, and that each job gets its fair share of the CPU; job B, which has the highest priority is started first. For (b) through (d) assume tha only one job at a time runs, until it finishes. All jobs are completely CPU bound.

Explanation / Answer

Jobs

a) RR(quantum = 1)

0----1------2-------3-------4-------5-------6------7-------8-------9-------10-----11------12-----13---14

Mean Waiting Time = (waiting time A+ waiting time B + waiting time C + waiting time D)/4 = (13+12+2+6)/4 = 8.25

b) Priority Scheduling

0-------------------------5---------------------------11-----------------------12----------------------------14

Mean Waiting Time = (5+0+11+12)/4 = 4.5

c) FCFS

0-------------------------6---------------------------11-----------------------12----------------------------14

Mean waiting time = (0+6+11+12)/4 = 4.75

d) Shortest Job First

0-------------------------1---------------------------3-----------------------8----------------------------14

Mean waiting time = (0+1+3+8)/4 = 3

Do ask if any query. Please upvote.

Jobs

Running Time Priority A 6 3 B 5 5 C 1 2 D 2 1
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote