Page 49 - DCAP403_Operating System
P. 49

Operating System




                    Notes          This approach can be used in many ways. For example, the Venus system was also designed
                                   using a layered approach. The lower layers (0 to 4), dealing with CPU scheduling and memory
                                   management, were then put into microcode. This decision provided the advantages of additional
                                   speed of execution and a clearly defined interface between the microcoded layers and the higher

                                   layers.


                                   The major difficulty with the layered approach involves the appropriate definition of the various
                                   layers. Because a layer can use only those layers that are at a lower level, careful planning is
                                   necessary.

                                          Example: The device driver for the backing store (disk space used by virtual-memory
                                   algorithms) must be at a level lower than that of the memory-management routines, because
                                   memory management requires the ability to use the backing store.
                                   Other requirements may not be so obvious. The backing-store driver would normally be above
                                   the CPU scheduler, because the driver may need to wait for I/O and the CPU can be rescheduled
                                   during this time. However, on a large system, the CPU scheduler may have more information

                                   about all the active processes than can fit in memory. Therefore, this information may need to be
                                   swapped in and out of memory, requiring the backing-store driver routine to be below the CPU
                                   scheduler.


                                   A final problem with layered implementations is that they tend to be less efficient than other
                                   types. For instance, for a user program to execute an I/O operation, it executes a system call
                                   which is trapped to the I/O layer, which calls the memory-management layer, through to the CPU

                                   scheduling layer, and finally to the hardware. At each layer, the parameters may be modifi ed,
                                   data may need to be passed, and so on. Each layer adds overhead to the system call and the net
                                   result is a system call that takes longer than one does on a non-layered system.
                                   These limitations have caused a small backlash against layering in recent years. Fewer layers
                                   with more functionality are being designed, providing most of the advantages of modularized

                                   code while avoiding the difficult problems of layer definition and interaction. For instance, OS/2

                                   is a descendant of MS-DOS that adds multitasking and dual-mode operation, as well as other
                                   new features.
                                   Because of this added complexity and the more powerful hardware for which OS/2 was designed,
                                   the system was implemented in a more layered fashion. Contrast the MS-DOS structure to that of
                                   the OS/2. It should be clear that, from both the system-design and implementation standpoints,
                                   OS/2 has the advantage. For instance, direct user access to low-level facilities is not allowed,
                                   providing the operating system with more control over the hardware and more knowledge of
                                   which resources each user program is using.
                                   As a further example, consider the history of Windows NT. The  first release had a very

                                   layer-oriented organization. However, this version suffered low performance compared to that
                                   of Windows 95. Windows NT 4.0 redressed some of these performance issues by moving layers
                                   from user space to kernel space and more closely integrating them.
                                   3.6 Virtual Machine


                                   A virtual machine is a type of computer application used to create a virtual environment, which
                                   is referred to as virtualization. Virtualization allows the user to see the infrastructure of a network
                                   through a process of aggregation. Virtualization may also be used to run multiple operating
                                   systems at the same time. Through the help of a virtual machine, the user can operate software
                                   located on the computer platform.
                                   There are different types of virtual machines. Most commonly, the term is used to refer to
                                   hardware virtual machine software, also known as a hypervisor or virtual machine monitor. This
                                   type of virtual machine software makes it possible to perform multiple identical executions on



          42                               LOVELY PROFESSIONAL UNIVERSITY
   44   45   46   47   48   49   50   51   52   53   54