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 turnaround time for these processes with the SJF scheduling algorithm?

Respuesta :

Answer:

a) 10.53

b) 9.53

Explanation:

a) Average Turnaround Time: ( (8-0)+(12-0.4)+(13-1.0) ) / 3 = 10.53

b) Average Turnaround Time: ( (8-0)+(13-0.4)+(9-1.0) ) / 3 = 9.53

Following are the calculation to the average turnaround time:

  • The length of time required to process a request is known as "turn-around time".
  • It is defined as the total amount of time spent between the end date and the starting time.
  • The essential times are associated with processes inside the OS:[tex]\text{"arrival time, waiting time, response time, burst time, completion time, and turn-around time".}[/tex]

Given:

Process                         Arrival Time                     Burst Time

[tex]P1\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0.0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 8\\\\P2 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 0.4 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 4\\\\P3 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 1.0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 1[/tex]

Using formula:

[tex]\to \bold{TAT= CT- AT}[/tex]

For point a:

Process  AT            BT           CT         TAT

[tex]P1\ \ \ \ \ \ \ \ \ \ 0.0 \ \ \ \ \ \ \ \ \ \ 8 \ \ \ \ \ \ \ \ \ \ 8 \ \ \ \ \ \ \ \ \ \ 8.0 \\\\P2\ \ \ \ \ \ \ \ \ \ 0.4\ \ \ \ \ \ \ \ \ \ 4 \ \ \ \ \ \ \ \ \ 12 \ \ \ \ \ \ \ \ \ \ 11.6 \\\\ P3\ \ \ \ \ \ \ \ \ \ 1.0 \ \ \ \ \ \ \ \ \ \ \ 1 \ \ \ \ \ \ \ \ \ 13 \ \ \ \ \ \ \ \ \ \ 12.0[/tex]

[tex]\to \bold{TAT=\frac{P1+P2+P3}{3}}[/tex]

             [tex]=\frac{8.0+11.6+12.0}{3}\\\\=\frac{31.6}{3}\\\\=10.53[/tex]

For point b:

Process  AT            BT           CT         TAT

[tex]P1\ \ \ \ \ \ \ \ \ \ 0.0 \ \ \ \ \ \ \ \ \ \ 8 \ \ \ \ \ \ \ \ \ \ 8 \ \ \ \ \ \ \ \ \ \ 8.0 \\\\P2\ \ \ \ \ \ \ \ \ \ 0.4\ \ \ \ \ \ \ \ \ \ 4 \ \ \ \ \ \ \ \ \ 13 \ \ \ \ \ \ \ \ \ \ 12.6 \\\\ P3\ \ \ \ \ \ \ \ \ \ 1.0 \ \ \ \ \ \ \ \ \ \ \ 1 \ \ \ \ \ \ \ \ \ 9 \ \ \ \ \ \ \ \ \ \ 8.0[/tex]

[tex]\to \bold{TAT=\frac{P1+P2+P3}{3}}[/tex]

             [tex]=\frac{8.0+12.6+8.0}{3}\\\\=\frac{28.6}{3}\\\\=9.53[/tex]

Therefore, the final answer is "10.53  and 9.53".

Learn more:

brainly.com/question/16045350

ACCESS MORE