Page 335 - DCAP103_Principle of operating system
P. 335

Principles of Operating Systems



                   Notes         Below we will first examine the various components of the system starting at the bottom and
                                 working our way up.

                                        Figure 11.1: The structure of Windows 2000 (slightly simplified). The shaded
                                            area is the executive. The boxes indicated by D are device drivers.
                                                      The service processes are system daemons.




                                                        POSIX program     Win32 program     OS/2 program
                                            Service
                                            process                                                         mode
                                                        POSIX subsystem  Win32 subsystem   OS/2 subsystem
                                                                                                            User
                                                           System interface (NT DLLDLL)


                                                                System services

                                    I/O mgr
                                            Object  Process Memory Security  Cache  PnP  Power  Config  LPC  Win32  mode
                                             mgr    mgr   mgr  mgr    mgr   mgr  mgr   mgr   mgr   GDI
                                     File sys
                                                                                                     Video  Kernel
                                                                    Kernel
                                     D                                                               driver
                                                          Hardware Abstraction layer (HAL)
                                                                   Hardware



                                                The software component of a computer system that is responsible for the
                                                management and coordination of activities and the sharing of the resources
                                                of  the  computer.  The  operating  system  (OS)  acts  as  a  host  for  application
                                                programs that are run on the machine.

                                 11.1.1 Hardware Abstraction Layer

                                 One of the goals of Windows 2000 (and Windows NT before it) was to make the operating system
                                 portable across platforms. Ideally, when a new machine comes along, it should be possible to just
                                 recompile the operating system with the new machine’s compiler and have it run for the first
                                 time. Unfortunately, the upper layers of the operating system can be made completely portable
                                 (because they mostly deal with internal data structures), while the lower layers deal with device
                                 registers, interrupts, DMA, and other hardware features that differ appreciably from machine to
                                 machine. Even though most of the low-level code is written in C, it cannot just be scooped up
                                 from a Pentium, plopped down on, say, an Alpha, recompiled, and rebooted due to the many
                                 small hardware differences between the Pentium and the Alpha that have nothing to do with
                                 the different instruction sets and which cannot be hidden by the compiler.
                                 Fully aware of this problem, Microsoft made a serious attempt to hide many of the machine
                                 dependencies in a thin layer at the bottom called the HAL (Hardware Abstraction Layer). (The
                                 name HAL was inspired by the computer HAL in the late Stanley Kubrick’s movie 2001: A
                                 Space Odyssey. Rumor has it that Kubrick chose the name “HAL” by taking the name of the
                                 then-dominant computer company—IBM—and subtracting 1 from each letter.)





        328                               LOVELY PROFESSIONAL UNIVERSITY
   330   331   332   333   334   335   336   337   338   339   340