Page 70 - DCAP403_Operating System
P. 70

Unit 4: Process Management





                               Figure 4.11: Detail Diagram of a Kernel Thread                   Notes


                           Process + Thread              Process + Thread
                            Virtual Layout                  Creation



                                              TSIDL




                                        Thread scheduling
                    TSRUN



                                                Process + Thread
                          TSRUNPROC               Termination
                                                                        TSZOMB



                     TSSLEEP


          Because of the compromises involved in each of these two approaches to threading, some systems
          use a hybrid approach in which both user-level and kernel-supported threads are implemented.
          Solaris 2 is such a system. A diagrammatic approach of hybrid thread is mentioned in
          Figure 4.12.

                                      Figure 4.12: Hybrid Thread



                                      Process









                                   runtime
                                   mapping


                                                              user-level thread

                                                              kernel entity

          4.9 Multi-threading


          When the computers were first invented, they were capable of executing one program at a time.

          Thus once one program was completely executed, they then picked the second one to execute and
          so on. With time, the concept of timesharing was developed whereby each program was given



                                           LOVELY PROFESSIONAL UNIVERSITY                                    63
   65   66   67   68   69   70   71   72   73   74   75