220k views
4 votes
For each of the four CPU scheduling algorithm: First Come First Serve, Shortest Job First, Shortest Remaining Time First, and Round Robin, you will compare and contrast these algorithms. For each scheduling algorithm using the following CPU scheduling example: 1. Generate the Gantt Chart. 2. For each process, compute its: a. Turnaround time. b. Waiting time. c. Response time. 3. Compute, to 2 decimal places: a. The average turnaround time. b. The average waiting time. c. The average response time. The Exam 2 Answer Document contains a table for each scheduling algorithm for you to fill out.

User Gmn
by
4.9k points

1 Answer

6 votes

Answer:

See explaination

Step-by-step explanation:

Turnaround Time (TAT):

It is the time interval from the time of submission of a process to the time of the completion of the process.

Difference b/w Completion Time and Arrival Time is called Turnaround Time.

Completion Time (CT): This is the time when the process completes it’s execution.

Arrival Time (AT): This is the time when the process has arrived in the ready state.

TAT = CT - AT

Waiting Time (WT):

The time spent by a process waiting in the ready queue for getting the CPU.

The time difference b/w Turnaround Time and Burst Time is called Waiting Time.

Burst Time (BT): This is the time required by the process for it’s execution.

WT = TAT - BT

Now with Waiting Time and Burst Time we can also calculate Turn Around Time via:

TAT = BT + WT

Response Time(RT)-

Response time is the time spent between the ready state and getting the CPU for the first time.

Please kindly check attachment for the step by step solution of the given problem.

For each of the four CPU scheduling algorithm: First Come First Serve, Shortest Job-example-1
For each of the four CPU scheduling algorithm: First Come First Serve, Shortest Job-example-2
For each of the four CPU scheduling algorithm: First Come First Serve, Shortest Job-example-3
For each of the four CPU scheduling algorithm: First Come First Serve, Shortest Job-example-4
For each of the four CPU scheduling algorithm: First Come First Serve, Shortest Job-example-5
User Shua
by
5.5k points