Professional Documents
Culture Documents
1.DS MicrokernelMonolithic Kernel
1.DS MicrokernelMonolithic Kernel
Responsible for offering secure access to the machine’s hardware for various
programs.
Decides when and how long a certain application uses specific hardware.
2
Difference between Microkernel and Monolithic Kernel
There are five types of kernels :
Hybrid Kernel:
A combination of microkernel and monolithic kernel architecture used in
DOS.
This kernel approach combines the speed and simpler design of
monolithic kernel with the modularity and execution safety of
microkernel.
3
Exokernel:
is an OS kernel developed by the MIT Parallel and Distributed Operating Systems
group, and also a class of similar operating systems.
Main Idea: Reduce the level of abstractions provided by OSs and allow application
level management of hardware resources as much as possible.
This gives the power to application developers to declare their own levels of
abstractions and manage the hardware.
Abstractions: file systems for disk storage, virtual address spaces for memory,
schedulers for task management, and sockets for network communication.
These abstractions of the hardware make it easier to write programs in general, but
limit performance and stifle experimentation in new abstractions. 4
Nanokernel
A small kernel that offers hardware abstraction, but without system services.
Larger kernels are designed to offer more features and manage more
hardware abstraction.
A kernel where the total amount of kernel code, i.e. code executing in the
privileged mode of the hardware, is very small.
The user services and kernel services are implemented in different address space. The user
services are kept in user address space, and kernel services are kept under kernel address
space.
Microkernels and their user environments are usually implemented in the C++ or C
programming languages with a little bit of assembly.
However, other implementation languages are possible with some high-level coding.
6
Monolithic Kernel
The entire OS runs as a single program in kernel mode.
The user & kernel services are implemented in same address space.
Runs all the basic system services like Process management, Memory
management, I/O communication, and interrupt handling, file system,
etc in kernel space.
User services and kernel services are kept in separate Both user services and kernel services are kept in the
address space. same address space.
To design a microkernel, more code is required. Less code when compared to microkernel
Failure of one component does not effect the working Failure of one component in monolithic kernel leads to
of micro kernel. failure of entire system.
8
Parameters Monolithic kernel MicroKernel
It can be broken down into
It is a large process running
Basic separate processes called
in a single address space
servers.
In order to write a In order to write a
Code monolithic kernel, less code microkernel, more code is
is required. required
If a service crashes, the If a service crashes, it never
Security whole system collapses in a affects the working of a
monolithic kernel. microkernel.
It is a single static binary Servers communicate
Communication
file through IPC.
Linux, BSDs, Microsoft
Windows (95,98, Me), L4Linux, QNX, SymbianK42,
Example
Solaris, OS-9, AIX, DOS, Mac OS X, Integrity, etc.
XTS-400, etc.
9
Monolithic Architecture
is like a big container, wherein all the software components of an app are
assembled and tightly coupled, i.e., each component fully depends on each
other.
Let’s take an example of an e-commerce site-
All the services provided by the application
(Customer Services, Cost Services, Product
Services) are directly connected.
10
11
Click to add text
12
Monolithic Kernel System
13
14
Disadvantages
Large and Complex Applications: It is difficult for maintenance because they are
dependent on each other.
Slow Development: It is because, for modify an application we have to redeploy
whole application instead of updates part. It takes more time or slow
development.
Unscalable: Each copy of the application will access the hole data which make
more memory consumption. We cannot scale each component independently.
Unreliable: If one services goes down, then it affects all the services provided by
the application. It is because all services of applications are connected to each
other.
Inflexible:Really difficult to adopt new technology.It is because we have to change
hole application technology.
What is the reason for not preferring monolithic architectures in recent times ?
15
Microkernel Architectures
Microkernel fulfills basic operations like memory, process scheduling mechanisms, and inter-
16
process communication.
Advantages of Microkernel
Microkernel architecture is small and isolated therefore it can function better.
Microkernels are secure because only those components are included that disrupt the
functionality of the system otherwise.
The expansion of the system is more accessible, so it can be added to the system application
without disturbing the Kernel.
Microkernels are modular, and the different modules can be replaced, reloaded, modified
without even touching the Kernel.
Fewer system crashes when compared with monolithic systems.
Microkernel interface helps you to enforce a more modular system structure.
Without recompiling, add new features
Server malfunction is also isolated as any other user program’s malfunction.
Microkernel system is flexible, so different strategies and APIs, implemented by different
servers, which can coexist in the system.
Increased security and stability will result in a decreased amount of code which runs on kernel
mode
17
Disadvantage of Microkernel
Providing services in a microkernel system are expensive compared to the
normal monolithic system.
Context switch or a function call needed when the drivers are implemented as
procedures or processes, respectively.
18
Basis of Comparison Monolithic Kernel MicroKernel
19
Implementation Aspect of Microkernel Architectures
20
Implementation Aspect of Microkernel Architectures
1. Creation of Plug-in Modules
2. Creating Contracts
21
Implementation Aspect of Microkernel Architectures
The plug-in modules are stand-alone, independent components that contain
specialized processing, additional features, and custom code that is meant to
enhance or extend the core system to produce additional business capabilities.
Plug-in modules should be independent of other plug-in modules, but you can
certainly design plug-ins that require other plug-ins to be present.
The core system needs to know about which plug-in modules are available and
how to get to them.
22
Implementation Aspect of Microkernel Architectures
Using Plug-in Registry.
This registry contains information about each plug-in module, including things
like its name, data contract, and remote access protocol details (depending on
how the plug-in is connected to the core system).
Example:
A plug-in for tax software that flags high-risk tax audit items might have a
registry entry that contains the name of the service (AuditChecker), the data
contract (input data and output data), and the contract format (XML).
It might also contain a WSDL (Web Services Definition Language) if the plug-in
is accessed through SOAP.
23
Implementation …
Plug-in modules can be connected to the core system through a variety of ways, including
OSGi (open service gateway initiative), messaging, web services, or even direct point-to-
point binding (i.e., object instantiation).
The type of connection depends on the type of application you are building (small product or
large business application) and your specific needs (e.g., single deploy or distributed
deployment).
24
Implementation …
The architecture pattern itself does not specify the implementation details, only that the
plug-in modules must remain independent from one another.
The contracts between the plug-in modules and the core system can range anywhere from
standard contracts to custom ones.
Custom contracts: Plug-in components are developed by a third party where you have no
control over the contract used by the plug-in. In such cases, it is common to create an
adapter between the plug-in contact and your standard contract so that the core system
doesn’t need specialized code for each plug-in.
When creating standard contracts (usually implemented through XML or a Java Map), it is
important to remember to create a versioning strategy right from the start.
25
Examples of Microkernel Architectures
1. Eclipse IDE
Downloading the basic Eclipse product provides little more than a fancy editor.
Once you start adding plug-ins, it becomes a highly customizable and useful product.
2. Internet browsers
A common product example using the microkernel architecture: viewers and other plug-ins add additional
capabilities that are not otherwise found in the basic browser (i.e., core system).
26
Plug-in Architecture
There should be a well-defined interface between the core and the plugins.
27
Application of Micro-kernel Architecture: Data
Pipelining
28
Different types of data (JSON(JavaScript Object Notation)/CSV(Comma
Separated Values Format)
A JSON file by default is larger and takes more time to parse compared to CSV.
… data sources (HTTP endpoint, AWS CloudWatch, sensor devices)
29
Thank
You
30