Page 47 - DCAP403_Operating System
P. 47

Operating System




                    Notes          3.5 Layered Structure

                                   A generalization of the approach as shown in the Figure 3.6 for organizing the operating system
                                   as a hierarchy of layers, each one constructed upon the one below it.
                                                           Figure 3.6: An Operating System Layer


                                                                                       Layer M
                                            New
                                          operations M

                                                                                    Layer M - 1
                                                               hidden
                                                              operations M


                                           Existing
                                          operations  M



                                   The system has 6 layers. Layer 0 dealt with allocation of the processor, switching between
                                   processes when interrupts occurred or timers expired. Above layer 0, the system consisted of
                                   sequential processes, each of which could be programmed without having to worry about the
                                   fact that multiple processes were running on a single processor. In other words, layer 0 provided
                                   the basic multiprogramming of the CPU.

                                                               Figure 3.7: Layered System

                                                Operator

                                                User Programme

                                                I/O Management
                                                Operator/Process Communication

                                                Memory (Main/secondary) Management

                                                Processor Allocation + Multiprogramming

                                                Hardware

                                   Layer 1 did the memory management. It allocated space for processes in main memory and on a
                                   512k word drum used for holding parts of processes (pages) for which there was no room in main
                                   memory. Above layer 1, processes did not have to worry about whether they were in memory
                                   or on the drum; the layer 1 software took care of making sure pages were brought into memory
                                   whenever they were needed.
                                   Layer 2 handled communication between each process and the operator console. Above this
                                   layer each process effectively had its own operator console.
                                   Layer 3 took care of managing the I/O devices and buffering the information streams to and
                                   from them. Above layer 3 each process could deal with abstract I/O devices with nice properties,
                                   instead of real devices with many peculiarities.



          40                               LOVELY PROFESSIONAL UNIVERSITY
   42   43   44   45   46   47   48   49   50   51   52