Page 80 - DCAP103_Principle of operating system
P. 80

Unit 3: Process Management-II



                                                                                                  Notes
            We can view context switch data in two ways:

               •  The System\Context Switches/sec counter in System Monitor reports systemwide context
                 switches.

               •  The Thread (_Total)\Context Switches/sec counter reports the total number of context
                 switches generated per second by all threads.

            Although these counters might vary slightly due to sampling, generally they will be nearly equal.

                   Figure 3.6: System Wide Context Switches During a Processor Bottleneck









































            In Figure 3.6, Processor (_Total)\% Processor Time jumps to about 60 per cent during the
            sample  interval.  System\Processor  Queue  Length  (scaled  by  a  factor  of  10),  shows  that
            the queue varies from 2 to 6, with a mean near 4. System\Context Switches (shown scaled
            by a factor of 10), reveals an average of about 750 switches per second. A rate of context
            switches from 500 to 2,000 per second might indicate a problem with a network adapter or
            a device driver or that you are using an inefficient server-based application that spawns
            too many threads.
            The Pviewer utility on the on the Windows 2000 operating system CD reports context switch
            data. For information about installing and using the Windows 2000 Support Tools and
            Support Tools Help, see the file Sreadme.doc in the \Support\Tools folder of the Windows
            2000 operating system CD.






                                             LOVELY PROFESSIONAL UNIVERSITY                                    73
   75   76   77   78   79   80   81   82   83   84   85