Page 20 - demo
P. 20

Uniprogramming

















        Program A                  Run                      Wait                       Run                      Wait




                                           Time

                                                             (a) Uniprogramming






                              The processor spends a certain amount of

                                 time executing, until it reaches an I/O


                                   Run
                                                                                                                Wait
                                                                                       Run
                                                            Wait
        Program A                instruction; it must then wait until that I/O
                                 instruction concludes before proceeding


        Program B                 Wait      Run                  Wait                           Run                  Wait





                                   Run Run                                             Run Run
        Combined                                                 Wait                                                Wait
                                     A        B                                          A        B


                                           Time

                                            (b) Multiprogramming with two programs










        Program A                  Run                      Wait                       Run                      Wait







        Program B                 Wait      Run                  Wait                           Run                  Wait







        Program C                      Wait           Run                     Wait                        Run             Wait





                                   Run Run Run                                         Run Run Run
        Combined                                                       Wait                                                Wait
                                     A        B         C                                A        B         C


                                           Time


                                           (c) Multiprogramming with three programs





                                  Figure 2.5   Multiprogramming Example
   15   16   17   18   19   20   21   22   23   24   25