Page 83 - DCAP103_Principle of operating system
P. 83

Principles of Operating Systems



                   Notes            3.  Fork is
                                      (a)  the dispatching of a task         (b)  the creation of a new job
                                      (c)  the creation of a new process     (d)  increasing the priority of a task
                                    4.  The components that process data are located in the:
                                      (a)  input devices                     (b)  output devices
                                      (c)  system unit                       (d)  storage component
                                    5.  System software is the set of programs that enables your computer’s hardware devices
                                      and ....................... software to work together.
                                      (a)  management                        (b)  processing
                                      (c)  utility                           (d)  application

                                 3.4 Scheduling Criteria

                                 Different CPU scheduling algorithms have different properties, and the choice of a particular
                                 algorithm may favor one class of processes over another. In choosing which algorithm to use in
                                 a particular situation, we must consider the properties of the various algorithms. Many criteria
                                 have been suggested for comparing CPU scheduling algorithms. Which characteristics are used
                                 for comparison can make a substantial difference in which algorithm is judged to be best. The
                                 criteria include the following:
                                    •  CPU Utilization: We want to keep the CPU as busy as possible.
                                    •  Throughput: If the CPU is busy executing processes, then work is being done. One measure
                                      of work is the number of processes that are completed per time unit, called throughput.
                                      For long processes, this rate may be one process per hour; for short transactions, it may
                                      be 10 processes per second.
                                    •  Turnaround Time: From the point of view of a particular process, the important criterion
                                      is how long it takes to execute that process. The interval from the time of submission of
                                      a process to the time of completion is the turnaround time. Turnaround time is the sum
                                      of the periods spent waiting to get into memory, waiting in the ready queue, executing
                                      on the CPU, and doing I/O.
                                    •  Waiting Time: The CPU scheduling algorithm does not affect the amount of the time
                                      during which a process executes or does I/O; it affects only the amount of time that a
                                      process spends waiting in the ready queue. Waiting time is the sums of periods spend
                                      waiting in the ready queue.
                                    •  Response Time: In an interactive system, turnaround time may not be the best criterion.
                                      Often, a process can produce some output fairly early and can continue computing
                                      new results while previous results are being output to the user. Thus, another measure
                                      is the time from the submission of a request until the first response is produced. This
                                      measure, called response time, is the time it takes to start responding, not the time it
                                      takes to output the response. The turnaround time is generally limited by the speed
                                      of the output device.
                                 It is desirable to maximize CPU utilization and throughput and to minimize turnaround time,
                                 waiting time, and response time. In most cases, we optimize the average measure. However,
                                 under some circumstances, it is desirable to optimize the minimum or maximum values rather
                                 than the average. For example, to guarantee that all users get good service, we may want to
                                 minimize the maximum response time. Investigators have suggested that, for interactive systems,
                                 it is more important to minimize the variance in the response time than to minimize the average
                                 response time. A system with reasonable and predictable response time may be considered more
                                 desirable than a system that is faster on the average but is highly variable. However, little work
                                 has been done on CPU-scheduling algorithms that minimize varianc.


        76                                LOVELY PROFESSIONAL UNIVERSITY
   78   79   80   81   82   83   84   85   86   87   88