Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user

So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.

enter image description here

  1. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
  2. What is the average turnaround time for these processes with the nonpreemptive SJF scheduling algorithm?
  3. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1$P_1$ at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 2 units and then nonpreemptive SJF scheduling is used. Remember that processes P1$P_1$ and P2$P_2$ are waiting during this idle time, so their waiting time may increase.
  4. What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm?

The values (including a make-shift Gantt chart) are as follows:

1. FCFS

0-----5-----8-----9

| P1 | P2 | P3 |\begin{array} {|r|r|} \hline P_1 &P_2 &P_3 \\ \hline 0-5 &5-8 &8-9 \\ \hline \end{array}

Completion times: P1=5, P2=8,P2=9$P_1=5, P_2=8,P_3=9$
Turnaround Time = 5.866667

2. Non-PreEmptive SJF

0-----5-----6-----9

| P1 | P3 | P2 |\begin{array} {|r|r|} \hline P_1 &P_3 &P_2 \\ \hline 0-5 &5-6 &6-9 \\ \hline \end{array}

Completion times: P1=5, P2=9, P3=6$P_1=5, P_2=9, P_3=6$
Tunaround Time = 5.2

3. Future-Knowledge (Non-PreEmptive SJF with Idle time)

0---2-----5------6----11

| X | P2 | P3 | P1 |\begin{array} {|r|r|} \hline - &P_2 &P_3 &P_1 \\ \hline 0-2 &2-5 &5-6 &6-11 \\ \hline \end{array}

Completion times: P1=11,P2=5,P3=6$P_1=11,P_2=5,P_3=6$
Turnaround Time = 6.2

4. PreEmptive SJF (SRTF)

0----0.4----3----3.4---4.4---9

| P1 | P2 | P2 | P3 | P1 |\begin{array} {|r|r|} \hline P_1 &P_2 &P_2 &P_3 &P_1 \\ \hline 0-0.4 &0.4-3 &3-3.4 &3.4-4.4 &4.4-9 \\ \hline \end{array}

Completion times: P1=9,P2=4.4,P3=3.4$P_1=9,P_2=4.4,P_3=3.4$
Turnaround Time = 4.133333333

Hopefully these values are correct. If they are not, could you please explain the process so that I can understand how to properly calculate it myself? Thank you in advance for any assistance!

So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.

enter image description here

  1. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
  2. What is the average turnaround time for these processes with the nonpreemptive SJF scheduling algorithm?
  3. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 2 units and then nonpreemptive SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase.
  4. What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm?

The values (including a make-shift Gantt chart) are as follows:

1. FCFS

0-----5-----8-----9

| P1 | P2 | P3 |

Completion times: P1=5, P2=8,P2=9 Turnaround Time = 5.866667

2. Non-PreEmptive SJF

0-----5-----6-----9

| P1 | P3 | P2 |

Completion times: P1=5, P2=9, P3=6 Tunaround Time = 5.2

3. Future-Knowledge (Non-PreEmptive SJF with Idle time)

0---2-----5------6----11

| X | P2 | P3 | P1 |

Completion times: P1=11,P2=5,P3=6 Turnaround Time = 6.2

4. PreEmptive SJF (SRTF)

0----0.4----3----3.4---4.4---9

| P1 | P2 | P2 | P3 | P1 |

Completion times: P1=9,P2=4.4,P3=3.4 Turnaround Time = 4.133333333

Hopefully these values are correct. If they are not, could you please explain the process so that I can understand how to properly calculate it myself? Thank you in advance for any assistance!

So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.

enter image description here

  1. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
  2. What is the average turnaround time for these processes with the nonpreemptive SJF scheduling algorithm?
  3. The SJF algorithm is supposed to improve performance, but notice that we chose to run process $P_1$ at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 2 units and then nonpreemptive SJF scheduling is used. Remember that processes $P_1$ and $P_2$ are waiting during this idle time, so their waiting time may increase.
  4. What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm?

The values (including a make-shift Gantt chart) are as follows:

1. FCFS

\begin{array} {|r|r|} \hline P_1 &P_2 &P_3 \\ \hline 0-5 &5-8 &8-9 \\ \hline \end{array}

Completion times: $P_1=5, P_2=8,P_3=9$
Turnaround Time = 5.866667

2. Non-PreEmptive SJF

\begin{array} {|r|r|} \hline P_1 &P_3 &P_2 \\ \hline 0-5 &5-6 &6-9 \\ \hline \end{array}

Completion times: $P_1=5, P_2=9, P_3=6$
Tunaround Time = 5.2

3. Future-Knowledge (Non-PreEmptive SJF with Idle time)

\begin{array} {|r|r|} \hline - &P_2 &P_3 &P_1 \\ \hline 0-2 &2-5 &5-6 &6-11 \\ \hline \end{array}

Completion times: $P_1=11,P_2=5,P_3=6$
Turnaround Time = 6.2

4. PreEmptive SJF (SRTF)

\begin{array} {|r|r|} \hline P_1 &P_2 &P_2 &P_3 &P_1 \\ \hline 0-0.4 &0.4-3 &3-3.4 &3.4-4.4 &4.4-9 \\ \hline \end{array}

Completion times: $P_1=9,P_2=4.4,P_3=3.4$
Turnaround Time = 4.133333333

Hopefully these values are correct. If they are not, could you please explain the process so that I can understand how to properly calculate it myself? Thank you in advance for any assistance!

added 44 characters in body
Source Link
asyncle
  • 21
  • 1
  • 3

So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.

enter image description here

  1. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
  2. What is the average turnaround time for these processes with the nonpreemptive SJF scheduling algorithm?
  3. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 2 units and then nonpreemptive SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase.
  4. What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm?

The values (including a make-shift Gantt chart) are as follows:

1. FCFS

0 5 8 9 |-----5-----8-----9

| P1 | P2 | P3 |

Completion times: P1=5, P2=8,P2=9 Turnaround Time = 5.866667

2. Non-PreEmptive SJF

0 5 6 9 |-----5-----6-----9

| P1 | P3 | P2 |

Completion times: P1=5, P2=9, P3=6 Tunaround Time = 5.2

3. Future-Knowledge (Non-PreEmptive SJF with Idle time)

0 2 5 6 11 |---2-----5------6----11

| X | P2 | P3 | P1 |

Completion times: P1=11,P2=5,P3=6 Turnaround Time = 6.2

4. PreEmptive SJF (SRTF)

0----0.4----3----3.4---4.4---9

| P1 | P2 | P2 | P3 | P1 | 0 0.4 3 3.4 4.4 9

Completion times: P1=9,P2=4.4,P3=3.4 Turnaround Time = 4.133333333

Hopefully these values are correct. If they are not, could you please explain the process so that I can understand how to properly calculate it myself? Thank you in advance for any assistance!

So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.

enter image description here

  1. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
  2. What is the average turnaround time for these processes with the nonpreemptive SJF scheduling algorithm?
  3. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 2 units and then nonpreemptive SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase.
  4. What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm?

The values (including a make-shift Gantt chart) are as follows:

1. FCFS

0 5 8 9 | P1 | P2 | P3 |

Completion times: P1=5, P2=8,P2=9 Turnaround Time = 5.866667

2. Non-PreEmptive SJF

0 5 6 9 | P1 | P3 | P2 |

Completion times: P1=5, P2=9, P3=6 Tunaround Time = 5.2

3. Future-Knowledge (Non-PreEmptive SJF with Idle time)

0 2 5 6 11 | X | P2 | P3 | P1 |

Completion times: P1=11,P2=5,P3=6 Turnaround Time = 6.2

4. PreEmptive SJF (SRTF)

| P1 | P2 | P2 | P3 | P1 | 0 0.4 3 3.4 4.4 9

Completion times: P1=9,P2=4.4,P3=3.4 Turnaround Time = 4.133333333

Hopefully these values are correct. If they are not, could you please explain the process so that I can understand how to properly calculate it myself? Thank you in advance for any assistance!

So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.

enter image description here

  1. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
  2. What is the average turnaround time for these processes with the nonpreemptive SJF scheduling algorithm?
  3. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 2 units and then nonpreemptive SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase.
  4. What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm?

The values (including a make-shift Gantt chart) are as follows:

1. FCFS

0-----5-----8-----9

| P1 | P2 | P3 |

Completion times: P1=5, P2=8,P2=9 Turnaround Time = 5.866667

2. Non-PreEmptive SJF

0-----5-----6-----9

| P1 | P3 | P2 |

Completion times: P1=5, P2=9, P3=6 Tunaround Time = 5.2

3. Future-Knowledge (Non-PreEmptive SJF with Idle time)

0---2-----5------6----11

| X | P2 | P3 | P1 |

Completion times: P1=11,P2=5,P3=6 Turnaround Time = 6.2

4. PreEmptive SJF (SRTF)

0----0.4----3----3.4---4.4---9

| P1 | P2 | P2 | P3 | P1 |

Completion times: P1=9,P2=4.4,P3=3.4 Turnaround Time = 4.133333333

Hopefully these values are correct. If they are not, could you please explain the process so that I can understand how to properly calculate it myself? Thank you in advance for any assistance!

Source Link
asyncle
  • 21
  • 1
  • 3

Processor Scheduling (SJF / FCFS)

So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.

enter image description here

  1. What is the average turnaround time for these processes with the FCFS scheduling algorithm?
  2. What is the average turnaround time for these processes with the nonpreemptive SJF scheduling algorithm?
  3. The SJF algorithm is supposed to improve performance, but notice that we chose to run process P1 at time 0 because we did not know that two shorter processes would arrive soon. Compute what the average turnaround time will be if the CPU is left idle for the first 2 units and then nonpreemptive SJF scheduling is used. Remember that processes P1 and P2 are waiting during this idle time, so their waiting time may increase.
  4. What is the average turnaround time for these processes with the preemptive SJF scheduling algorithm?

The values (including a make-shift Gantt chart) are as follows:

1. FCFS

0 5 8 9 | P1 | P2 | P3 |

Completion times: P1=5, P2=8,P2=9 Turnaround Time = 5.866667

2. Non-PreEmptive SJF

0 5 6 9 | P1 | P3 | P2 |

Completion times: P1=5, P2=9, P3=6 Tunaround Time = 5.2

3. Future-Knowledge (Non-PreEmptive SJF with Idle time)

0 2 5 6 11 | X | P2 | P3 | P1 |

Completion times: P1=11,P2=5,P3=6 Turnaround Time = 6.2

4. PreEmptive SJF (SRTF)

| P1 | P2 | P2 | P3 | P1 | 0 0.4 3 3.4 4.4 9

Completion times: P1=9,P2=4.4,P3=3.4 Turnaround Time = 4.133333333

Hopefully these values are correct. If they are not, could you please explain the process so that I can understand how to properly calculate it myself? Thank you in advance for any assistance!