0% found this document useful (0 votes)
5 views17 pages

3-Operating System Structures

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
5 views17 pages

3-Operating System Structures

Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 17

Operating System Structures

Monolithic Systems
Layered Systems
Micro Kernels
Modular
Monolithic Systems

Prominent in the early days.


In this approach entire operating system runs as a single
program in kernel mode.
The operating system is written as a collection of procedures,
linked together into a single large executable binary program.
When this technique is used, each procedure in the system is
free to call any other one.
Monolithic Systems
This organization suggests a basic structure for the operating
system:
1. A main program that invokes the requested service procedure.
2. A set of service procedures that carry out the system calls.
3. A set of utility procedures that help the service procedures.
In this model, for each system call there is one service
procedure that takes care of it and executes it. The utility
procedures do things that are needed by several service
procedures.
Layered Approach
In a layered approach, the operating system is divided
into a number of layers (levels), each built on top of
lower layers. The bottom layer (layer 0), is the
hardware; the highest (layer N) is the user interface.

Each layer uses functions (operations) and services of


lower-level layers ie Layer n+1 uses services
(exclusively) supported by layer n

 Easier to extend and evolve.


Layered Operating System
Layered Operating System
Advantage
Simplicity of construction and debugging.
Each layer uses functions (operations)and services of only
lower-level layers. This approach simplifies debugging and
system verification.
The first layer can be debugged without any concern for the
rest of the system, because, it uses only the basic hardware to
implement its functions.
Once the first layer is debugged, its correct functioning can be
assumed while the second layer is debugged, and so on.
 If an error is found during the debugging of a particular layer,
the error must be on that layer, because the layers below it are
already debugged. Thus, the design and implementation of the
system are simplified.
Layered Operating System
Disadvantage
It is difficult to appropriately define the various layers.
Because a layer can use only lower-level layers, careful
planning is necessary.
 For example, the device driver for the backing store must be at
a lower level than the memory-management routines, because
memory management requires the ability to use the backing
store.
Example of Layered Operating System: THE
Microkernel System Structure
Microkernel design achieves high reliability by splitting the
operating system up into small, well-defined modules, only one of
which—the microkernel—runs in kernel mode and the rest run
as user processes.
Communication takes place between user modules using message
passing.
By running each device driver and file system as a separate user
process, a bug in one of these can crash that component, but
cannot crash the entire system.
Thus a bug in the audio driver will cause the sound to be garbled
or stop, but will not crash the computer.
 In contrast, in a monolithic system with all the drivers in the
kernel, a buggy audio driver can easily reference an invalid
memory address and bring the system to halt instantly.
Microkernel System Structure

Benefits:
Easier to extend a microkernel
Easier to port the operating system to new architectures
More reliable (less code is running in kernel mode)
More secure
Demerit:
Performance overhead of user space to kernel space
communication
Microkernel System Structure- Eg:MINIX 3 system

Outside the kernel, the system is structured as three layers of


processes all running in user mode.
The lowest layer contains the device drivers. Since they run in
user mode, they do not have physical access to the I/O port space
and cannot issue I/O commands directly.
To program an I/O device, the driver makes a kernel call telling
the kernel to do the write.
Microkernel System Structure-
Eg:MINIX 3 system
Above the drivers is another user-mode layer containing the
servers, which do most of the work of the operating system.
One or more file servers manage the file system(s), the process
manager creates, destroys, and manages processes, and so on.

User programs obtain operating system services by sending


short messages to the servers asking for the POSIX system
calls. For example, a process needing to do a read sends a
message to one of the file servers telling it what to read
Microkernel System Structure-
Eg:MINIX 3 system
Reincarnation server check if the other servers and drivers
are functioning correctly. If a faulty one is detected, it is
automatically replaced without any user intervention. In this
way the system is self healing and can achieve high reliability.
Modular
Best current methodology for operating-system design
involves using loadable kernel modules.
Here, the kernel has a set of core components and links in
additional services via modules, either at boot time or during
run time.
This type of design is common in modern implementations of
UNIX, such as Solaris, Linux, and Mac OS X, as well as
Windows.
Modular
Kernel provides core services while other services are
implemented dynamically, as the kernel is running.
Resembles a layered system in that each kernel section has
defined, protected interfaces; but it is more flexible than a
layered system, because any module can call any other module.
The approach is also similar to the microkernel approach in
that the primary module has only core functions; but it is more
efficient, because modules do not need to invoke message
passing in order to communicate.
Modular-Example :Solaris operating
system structure
Modular-Example :Solaris operating
system structure
The Solaris operating system structure, is organized
around a core kernel with seven types of loadable kernel
modules:
1. Scheduling classes
2. File systems
3. Loadable system calls
4. Executable formats
5. STREAMS modules
6. Miscellaneous
7. Device and bus drivers

You might also like