Computer Science, asked by saivindhyagita2890, 3 days ago

Five batch jobs A,B,C,D and E arrive at a computer centre at almost at the same time. They have estimated running times of 10,6,2,4 and 8 minutes. Their priorities are 3,5,2,1 and 4 respectively, with 5 being the highest priority.
For each of the following scheduling algorithm determine the Turn Around Time of each process and waiting time of each process.
Mention which algorithm results in minimal average waiting time.
1. Round Robin
2. Priority scheduling
3. First come first served
4. Shortest job first.
For case i) assume that system is multiprocessing and each job gets its fair share of the CPU.(time quantum 2 minutes).
For cases (ii),(iii) and (iv) assume that only one job runs at a time, until it finishes. All jobs are completely CPU bound.

Answers

Answered by 1592008
6

Answer:

Five batch jobs A,B,C,D and E arrive at a computer centre at almost at the same time. They have estimated running times of 10,6,2,4 and 8 minutes. Their priorities are 3,5,2,1 and 4 respectively, with 5 being the highest priority.

For each of the following scheduling algorithm determine the Turn Around Time of each process and waiting time of each process.

Mention which algorithm results in minimal average waiting time.

1. Round Robin

2. Priority scheduling

3. First come first served

4. Shortest job first.

For case i) assume that system is multiprocessing and each job gets its fair share of the CPU.(time quantum 2 minutes).

For cases (ii),(iii) and (iv) assume that only one job runs at a time, until it finishes. All jobs are completely CPU bound.

Answered by anjaliom1122
0

Answer:

Remember that the turnaround time is the time between when a work is received and when it is completed. Because we assume that all jobs arrive at the same time, the turnaround time is simply the time it takes for them to finish.

Explanation:

(a) Round Robin : The table below shows the jobs that will be processed at each time quantum. A * signifies that the project is finished within the time frame.

Average turnaround =(8 + 17 + 23 + 28 + 31)/5 = 107/5 = 21.4 minutes

(b) Priority Scheduling:

Avg. turnaround = (6 + 14 + 25 + 27 + 31)/5 = 103/5 = 20.6 minutes

(c) First come first served:

Avg. turnaround = (11 + 17 + 19 + 23 + 31)/5 = 101/5 = 20.2 minutes

(d) Shortest job first:

Avg. turnaround = (2 + 6 + 12 + 20 + 31)/5 = 71/5 = 14.2 minutes

Finding the average process turnaround time can also be done by multiplying the number

of unfinished processes by the time they remain unfinished dividing by number of

processes. This makes finding solutions for parts b, c, and d particularly efficient. For

example, the calculation for part C can be represented by (5*11 + 4*6 +3*2 + 2*4 + 1*8)/5.

Grading guide

Each part of the four parts of question 3 were worth a total of 2.5 points. More than 2.5

points could not be lost for any part. They were graded as follows:

-1 Intermediate mistake in work such as incorrect process turnaround time or diagram,

but correct final answer.

-2  Intermediate mistake in work, but correct final answer given that mistake. For example

using process turnaround time of 15 minutes when it should be 25minutes.

-1 Mistake in arithmetic.

-1 Using wrong time quantum in part a.

-1 Reversing priority in part b.

-1.25 Calculating wait time instead of turnaround time.

-2 Not using given values. For example making A take 12 minutes to complete instead of

-1 Determining order of round-robin by priority.

Round-Robin scheduling is the same as first come first serve, except with preemption. The assumption is that the processes are delivered in A,B,C,D,E order, and if a different assumption is made then they should be round-robin scheduled in the same order as the FCFS method.

Similar questions