Question

Problem 6 The following tables show the timing for processes using two different scheduling algorithms based...

Problem 6 The following tables show the timing for processes using two different scheduling algorithms based on the table of process arrival times and burst times (All ties were resolved using the arrival time). Using this information:

  1. Calculate the average turnaround time for each algorithm. Show your work.
  2. Name the scheduling algorithm used to generate the timing tables.

Process

Arrival Time

Burst Time

P1

0

4

P2

3.9

1

P3

2.9

3

P4

0.9

2

P5

1.9

4

Mystery Algorithm #1

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

P1

P2

P3

P4

P5

Average Turnaround Time:

Name of the algorithm:

Mystery Algorithm #2

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

P1

P1

P1

P2

P3

P4

P5

Average Turnaround Time:

Name of the algorithm:

Homework Answers

Answer #1

EXPLANATION:

Turnaround Time of a single process = Completion Time - Arrival Time

Average Turnaround Time = Sum of Turnaround Time of all processes / Number of process.

Completion Time of a process = The time which has passed away till now + burst time

Mystery Algorithm #1

Turnaround Time of Process 1 = 4 - 0 = 4

Turnaround Time of Process 2 = 7 - 3.9 = 3.1

Turnaround Time of Process 3 = 10 - 2.9 = 7.1

Turnaround Time of Process 4 = 6 - 0.9 = 5.1

Turnaround Time of Process 5 = 14 - 1.9 = 12.1

Average Turnaround Time = ( 4 + 3.1 + 7.1 + 5.1 + 12.1 ) / 5 = 31.4 / 5 = 6.28

Name of the algorithm = Shortest Job First ( Non Preemptive ) - In this algorithm the processes which have the shortest burst time are scheduled first. If 2 processes have the same bust time then First Come First Serve algorithm is used to break the tie.

Mystery Algorithm #2

Turnaround Time of Process 1 = 7 - 0 = 7

Turnaround Time of Process 2 = 4.9 - 3.9 = 1

Turnaround Time of Process 3 = 10 - 2.9 = 7.1

Turnaround Time of Process 4 = 2.9 - 0.9 = 2

Turnaround Time of Process 5 = 14 - 1.9 = 12.1

Average Turnaround Time = ( 7 + 1 + 7.1 + 2 + 12.1 ) / 5 = 29.2 / 5 = 5.84

Name of the algorithm = Shortest Remaining Time First ( Preemptive ) - It is preemptive mode of Shortest Job First algorithm in which jobs are schedule according to shortest remaining time. In preemptive scheduling, the job which is being executed can be stopped at the arrival of a job which has a shorter remaining execution time than the currently executing process.

THANKS,

PLEASE UPVOTE THE ANSWER.

Know the answer?
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
Similar Questions
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority,with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time quantum of 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue. Process            Burst Time Arrival Time...
Consider the following set of processes, with the length of the CPU burst given in milliseconds:...
Consider the following set of processes, with the length of the CPU burst given in milliseconds: Process Burst Time Priority P1 4 3 P2 7 2 P3 2 6 P4 5 1 P5 4 2 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive priority (a larger priority number implies...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority,with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time quantum of 10 units. If a process is preempted by a higher-priority process, the preempted process is placed at the end of the queue. Process            Burst Time Arrival Time...
Suppose that the following processes arrive for execution at the times indicated. Each process will run...
Suppose that the following processes arrive for execution at the times indicated. Each process will run for the amount of time listed. In answering the questions, use non-preemptive scheduling, and base all decisions on the information you have at the time the decision must be made. Process Arrival Time Burst Time P1 0.0 8 P2 0.4 4 P3 1.0 1 a. What is the average turnaround time for these processes with the FCFS scheduling algorithm? b. What is the average...
The following processes are being scheduled using a preemptive, round-robin scheduling algorithm. (20 Marks) Process    ...
The following processes are being scheduled using a preemptive, round-robin scheduling algorithm. Process     Priority Burst Time Arrival P1 40 20 0 P2 30 25 25 P3 30 15 30 P4 35 10 60 P5 5 10 100 P6 10 10 105 Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. In addition to the processes listed below, the system also has an idle task (which consumes no CPU resources and is identified...
Using the non-preemptive and preemptive Priority schedulers, draw out process execution timelines for the following processes....
Using the non-preemptive and preemptive Priority schedulers, draw out process execution timelines for the following processes. Clearly indicate the wait time for each process for each scheduler.   Process Arrival Burst Priority P1 0 6 2 P2 3 2 1 P3 6 8 4 P4 9 4 5 P5 12 3 3
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds:...
Consider the following set of processes, with the length of the CPU-burst time given in milliseconds: Process            Burst Time Priority P1                               5 4 P2                               3 1 P3                               1 2 P4                               7 2 P5                               4 3 The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0. If nonpreemptive priority (a larger priority number implies a higher priority) is used, what is the average waiting time of...
A set of processes along with their burst time in milliseconds is given below. The processes...
A set of processes along with their burst time in milliseconds is given below. The processes should execute in First Come First Served order. Assume that the quantum (q) is 3: Process Burst Time P1 22 P2 4 P3 12 P4 15 P5 2 Find the average waiting time using the Round Robin algorithm. Round your answer to 2 decimal places
Process Burst Time Priority Arrival p1 8 15 0 p2 3 20 0 p3 4 20...
Process Burst Time Priority Arrival p1 8 15 0 p2 3 20 0 p3 4 20 20 p4 4 20 25 p5 5 5 45 p6 5 15 55 The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. The scheduler will execute the highest-priority process. For processes with the same priority, a round-robin scheduler will be used with a time...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Process Priority Burst...
The following processes are being scheduled using a preemptive, priority-based, round-robin scheduling algorithm. Process Priority Burst Arrival P 1 8 15 0 P 2 3 20 0 P 3 4 20 20 P 4 4 20 25 P 5 5 545 P 6 5 15 55 Each process is assigned a numerical priority, with a higher number indicating a higher relative priority. The scheduler will execute the highestpriority process. For processes with the same priority, a round-robin scheduler will be...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT