Page 141 - PowerPoint Presentation
P. 141

CAVITE STATE UNIVERSITY
                               T3 CAMPUS
                               Department of Information Technology         ITEC 55 – Platform Technologies

               what is its burst time. This will be executed till 8 units of time. Till then, we have three more
               processes arrived in the ready queue hence the scheduler will choose the process with the
               lowest burst time.
                       Among the processes given in the table, Process C will be executed next since it is
               having  the  lowest burst time  among  all  the available process. Apply  the  same  method  in
               scheduling the other processes.
                                                              Completion     Turnaround       Waiting
                 Process ID     Arrival Time   Burst Time
                                                                 Time            Time           Time
                      A              1              7              8              7               0
                      B              3              3              13             10              7
                      C              6              2              10             4               2
                      D              7              10             31             24             14
                      E              9              8              21             12              4

                                   A          C      B            E                  D
                         0     1                     8          10         13                        21                              31
                                                       Gantt Chart

               Average Turnaround Time is:                        Average Waiting Time is:
               (7+10+4+24+12) / 5 = 11.4 ms                       (0+7+2+14+4) / 5 = 5.4 ms

               QUIZ 4. Search for the examples of preemptive and non-preemptive scheduling in real life
               situations. (10 pts)

               QUIZ 5. CPU Scheduling (Show complete solution, including Gantt Chart)
                   1.  Use First Come First Serve (FCFS) Scheduling
                                                              Completion     Turnaround       Waiting
                 Process ID     Arrival Time   Burst Time
                                                                 Time            Time           Time
                      A              4              8
                      B              3              4
                      C              10             5
                      D              6              3
                      E              0              2

                   2.  Use Shortest Job First (SJF)
                                                              Completion     Turnaround       Waiting
                 Process ID     Arrival Time   Burst Time
                                                                 Time            Time           Time
                      A              0              8
                      B              3              4
                      C              4              5
                      D              6              3
                      E              10             2
                      F              11             7














                                                                                                 Page | 21
   136   137   138   139   140   141   142   143   144   145   146