Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
134 views

Operating System Structure

The document discusses different operating system structures including monolithic systems, layered systems, virtual machines, exokernels, and client-server systems. Monolithic systems have all OS components tightly bound together, while layered systems divide the OS into separate layers. Virtual machines provide isolated virtual copies of the hardware. Exokernels allocate hardware resources to virtual machines. Client-server systems implement most OS functions as user processes that communicate through requests and servers.

Uploaded by

Paolo Legaspi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views

Operating System Structure

The document discusses different operating system structures including monolithic systems, layered systems, virtual machines, exokernels, and client-server systems. Monolithic systems have all OS components tightly bound together, while layered systems divide the OS into separate layers. Virtual machines provide isolated virtual copies of the hardware. Exokernels allocate hardware resources to virtual machines. Client-server systems implement most OS functions as user processes that communicate through requests and servers.

Uploaded by

Paolo Legaspi
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

OPERATING SYSTEM STRUCTURE

OS designs are:
1. Monolithic system
2. Layered system
3. Virtual machine
4. ExoKernels
5. Client server system
MONOLITHIC SYSTEMS
• “The Big Mess”
• The structure is that, there is no structure.
• The O.S. is written as collection of procedures.
• Each of which can call any of the other ones whenever it needs
to
• Each procedure in the system has a well defined interface in
terms of parameters and results.
• To construct actual object program of O.S., one first compiles all
individual procedures and then binds them all together into a
single object. file using the system Linker.
• In terms of Information hiding there is nothing because each
procedure is visible to every other procedure
MONOLITHIC SYSTEMS
• The services provided by O.S. are requested by putting parameter in well
defined places as in registers or on the stack and then executing a special
trap instruction known as kernel call.
• This instruction Switches machine from user mode to kernel mode and
transfers control to the O.S.
• The O.S. then examines the parameters of the call to determine which
system call is to be carried out

• Basic structure of the O.S. can be divided into 3 parts:


(a) A main program that invokes, the requested service
procedures.
(b) A set of service procedures that carry out system Calls.
(c) A set of utility procedures that help the service procedure
MONOLITHIC SYSTEMS

• In this model for each system Call there is one service procedures.
• That takes care of it.
• The utility procedures do things that are needed by several service
procedures as fetching data from user program.
OS STRUCTURE - SIMPLE APPROACH

• MS-DOS - provides a lot of functionality in little space.


• Not divided into modules, Interfaces and levels of functionality are
not well separated
MS-DOS STRUCTURE
OS STRUCTURE - SIMPLE APPROACH

• UNIX
• limited structuring
• has 2 separable parts
• Systems programs
• Kernel

• everything below system call interface and


above physical hardware is kernel
• Is responsible for File system, CPU
scheduling, memory management etc
TRADITIONAL UNIX SYSTEM
STRUCTURE
Layered Systems

• A first generalization of previous approach is to


organize the O.S. as a hierarchy of layers
• Main Advantage of the layered approach is modularity
• Each layer uses functions and services of the
lower level layers
• Simplifies debugging and system verification
Layered Systems

1. Ex first layer can be debugged without any concern for the


rest of the system, b’coz by definition it uses only the basic
H/W to implement its functions
2. Once first layer is debugged, its correct functioning can be
assumed while the second layer is worked on, and so on
• If an error is found during the debugging of a particular
layer, we know that the error must be on that layer, b’coz
the layers below it are already debugged
• The design and implementation is simplified when the
system is broken down into layers
LAYERED SYSTEMS

• A first generalization of previous approach is to organize the O.S. as a hierarchy of


layers.
• The first system constructed was THE system (Technische Hogeschool Eindhoven)

• The systems had 6 layers.


LAYERED SYSTEMS

Problems with the layered approach


1. The appropriate definition of the various layers
(because a layer can use only those layers that are
at a lower level)
2. Careful planning is necessary
• Ex device drivers for backing store must be lower than that of the memory
management routines
LAYERED SYSTEMS

Problems with the layered approach


3. It is less efficient than other types
• Ex a user program to execute an I/O operation, it executes a
system call that is trapped to the I/O layer, which calls the
memory-mgmt layer, through to the CPU scheduling and
finally to the hardware
• At each layer, the parameters may be modified, data may need
to be passed etc
4. Each layer adds overhead to the system call
• and system call takes more time compare to non-layered
system
LAYERED SYSTEMS

• The layering concept was present in the MULTICS Systems


• OS/2
• WIN NT
• Windows 95
• Instead of layers, MULTICS was organized as a series of concentric rings
with inner being more privileged than outer ones.
• When a procedure in an outer ring wanted to call a procedure in an
Inner ring, it had to make the equivalent of a systems call whose
parameters were checked for validity before allowing the call to proceed.
VIRTUAL MACHINES

• Developed by IBM originally called CP/CMS and later renamed as


VM1370, which’ based on observations

1. Timesharing system
2. Multiprogramming
3. An extended machine with a more convenient interface
than the bare hardware.

• “Essence of VM/370 is to completely separate these two


function”
VIRTUAL MACHINES

• The heart of the systems known as virtual machine monitor


runs on the bare hardware and does multiprogramming
providing several virtual machine to the next layer up a shown in
Fig.
VIRTUAL MACHINES
• Virtual machines are exact copies of bare hardware
including kernel users mode I. interrupts and
everything else the real machine has.
• Since each virtual machine is identical to the true
hardware, each one can run any O.S. that will run
directly on bare hardware.
• Different virtual machine runs different OS. Some
run on OS/360 while other run on a single user
interactive system called CMS (conversational
Monitor system).
VIRTUAL MACHINES
• VM OS for IBM is Virtual Machine EX
• By using CPU scheduling and Virtual Memory techniques, an
OS can create an illusion of multiple processes
• Each executing its own (virtual) processor with its own
(virtual) memory.
• Virtual Machine provides an interface that is identical to the
Hardware.
1. Each process is provided with a virtual copy of the
underlying computer
2. The resources of the physical computer are shared to
create the virtual machines
3. CPU, I/O, Memory, disks are shared & virtual copies are
created.
VIRTUAL MACHINES (CONT)

•Each VM is isolated from all other VM so there are no security


problems.
VM ARCHITECTURE
•Users are given their own VM
They can run any of the OS or S/W packages on these machines
EXO-KERNELS
• With VM/370 each user gets an exact copy of the actual computer
• With virtual 8086 mode on Pentium, each user process gets an exact copy
of a different computer
• MIT have built a system that gives each user a clone of the actual computer,
but with a subset of the resources
• One VM might get disk blocks 0 to 1023, the next might get blocks 1024 to
2047, and so on.

• At the bottom layer, running in kernel mode, is a


program called exokernel.
• Its job is to allocate resources to virtual Machines and
then check attempts to use them to make sure no
machine is trying to use somebody else’s resources.
EXOKERNELS
• Each user level virtual machine can run its own OS as on VM/370 and the
Pentium virtual 8086s, except that each one is restricted to using only
the resources it has asked for and been allocated.
• The advantage of exokernel scheme is that it saves a layer of mappings.
(remapping not required)
• In other VM monitor must maintain tables to remap disk addresses (all
other resources)
• The exokernel keeps track of which virtual machine has been assigned
which resources.
• Separating multiprogramming from the user operating system
CLIENT-SERVER SYSTEM

• A usual approach is to implement most of O.S.


function in user processes.
• To request a service, a “user process or client
process” sends a request to a server process.
CLIENT-SERVER SYSTEM

• All the kernel does is to handle the communication


between clients and servers.
• All servers run as user mode processes and not in
kernel mode, they don’t have direct access to the
hardware.
• As a consequence if a bug in the file server is triggered
the file service may crash but this won’t bring the whole
machine down.
CLIENT-SERVER SYSTEM
• Another advantage of the client-server model is its adaptability
to use in distributed system.
• If a client communicates with a server by sending it messages.
The client needn’t know whether messages is handled locally in
its own machine or whether it was sent across network to a
server on a remote machine

You might also like