<div dir="ltr"><div>Hello OS Class:</div><div><br></div><div>Project 1 output has a slight mistake for the FCFS average turnaround time. It should be 22.67.</div><div><br></div><div>I've had a couple questions on how to compute the average wait time and average turnaround time. My explanation relates to the FCFS scheduling algorithm using the input from project 1.</div><div><br></div><div>pid<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>arrival<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>burst<span class="gmail-Apple-tab-span" style="white-space:pre">        </span></div><div>---------------------</div><div>1<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>0<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>10<span class="gmail-Apple-tab-span" style="white-space:pre">        </span></div><div>2<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>0<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>9</div><div>3<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>3<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>5<span class="gmail-Apple-tab-span" style="white-space:pre">        </span></div><div>4<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>7<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>4</div><div>5<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>10<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>6</div><div>6<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>10<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>7</div><div><br></div><div>The average wait time is the average amount of time each process waits in the readyQ.</div><div>So, for each process the wait time is the time the process gets access to the CPU minus </div><div>the time the process arrives.</div><div>P1 wait time is (0 - 0) = 0</div><div>P2 wait time is (10 - 0) = 10</div><div>P3 wait time is (19-3) = 16</div><div>P4 wait time is (24-7) = 17</div><div>P5 wait time is (28-10) = 18</div><div>P6 wait time is (34-10) = 24</div><div>To get the average, add all of these together and divide by 6:</div><div>(0+10+16+14+18+24)/6 = 14.17</div><div><br></div><div>The average turnaround time is the average amount of time that it takes from the time it is</div><div>submitted to the time it finishes. So, for our project, this is the average amount of time starting from when the process finishes minus the time the process arrives.</div><div>P1 turn around time = (10-0) = 10</div><div>P2 turn around time = (19-0) = 19 </div><div>P3 turn around time = (24-3) = 31</div><div>P4 turn around time = (28-7) = 21</div><div>P5 turn around time = (34-10) = 24</div><div>P6 turn around time = (41-10) = 31</div><div>To get the average, add all of these together and divide by 6:</div><div>(10 + 19+31+21+24+31)/6 = 22.67</div><div><br></div><div>Best,</div><div>Dianne</div>
</div>