Page 98 - DCAP403_Operating System
P. 98

Unit 5: Scheduling




               (a)  During time slot 0, threads A  through A  are scheduled and run             Notes
                                           0        5
               (b)  During time slot 1, threads B , B , B , C , C , C  are scheduled and run
                                           0  1  2  0  1  2
               (c)  During time slot 2, D’s five threads and E  get to run

                                                     0
               (d)  The remaining six threads belonging to process E run in the time slot 3. Then the
                    cycle repeats, with slot 4 being the same as slot 0 and so on.
               (e)  Gang scheduling is useful for applications where performance severely degrades
                    when any part of the application is not running.

          5.7.3 Dedicated Processor Assignment

          1.   When application is scheduled its threads are assigned to a processor.
          2.   Some processor may be idle and no multiprogramming of processors.


          3.   Provides implicit scheduling defined by assignment of threads to processors. For the
               duration of program execution, each program is allocated a set of processors equal in
               number to the number of threads in the program. Processors are chosen from the available
               pool.

          5.7.4 Dynamic Scheduling

          1.   Number of threads in a process are altered dynamically by the application.
          2.   Operating system and the application are involved in making scheduling decisions. The
               OS is responsible for partitioning the processors among the jobs.
          3.   Operating system adjusts load to improve the use:
               (a)  Assign idle processors.
               (b)  New arrivals may be assigned to a processor that is used by a job currently using
                    more than one processor.
               (c)  Hold request until processor is available
               (d)  New arrivals will be given a processor before existing running applications.




              Task   List various versions of load sharing.


          5.8 Summary


               The processes in the system can execute concurrently, and they must be created and
               deleted dynamically. Thus, the operating system must provide a mechanism (or facility)
               for process creation and termination. Processes can be terminated in one of two ways:
               Normal Termination and Abnormal Termination.

               When more than one process are executing concurrently in the operating system, then they
               are allowed to cooperate (both mutually and destructively) with each other.
               Those processes are known as cooperating process. Inter-Process Communication (IPC)
               is a set of techniques for the exchange of data among two or more threads in one or more
               processes.





                                           LOVELY PROFESSIONAL UNIVERSITY                                    91
   93   94   95   96   97   98   99   100   101   102   103