system. It acts as an interface between the user applications and the hardware. Aim of Kernel: The sole aim of the kernel is to manage the communication between the software (user level applications) and the hardware (CPU, disk memory etc).
The main tasks of the kernel are: - Process
management - Device management - Memory management - Interrupt handling - I/O communication - File system...etc. – Difference between kernel and OS
Kernel as described above is the heart of OS
which manages the core features of an OS while if some useful applications and utilities are added over the kernel, then the complete package becomes an OS. - So, it can easily be said that an operating system consists of a kernel space and a user space. OS architecture: Types Of Kernels Operating systems based on four types of Kernel Architectures. Which are as following:
Earlier in this type of kernel architecture, all the
basic system services like process and memory management, interrupt handling etc were packaged into a single module in kernel space. Drawbacks This type of architecture led to some serious drawbacks like
1) Size of kernel, which was huge.
2)Poor maintainability, which means bug fixing
or addition of new features resulted in recompilation of the whole kernel which could consume hours Now a Days…!! • In a modern day approach to monolithic architecture, the kernel consists of different modules which can be dynamically - This modular approach allows easy extension of OS's capabilities. With this approach, maintainability of kernel became very easy as only the concerned module needs to be loaded and unloaded every time there is a change or bug fix in a particular module. • So, there is no need to bring down and recompile the whole kernel for a smallest bit of change. Also, stripping of kernel for various platforms (say for embedded devices etc) became very easy as we can easily unload the module that we do not want. Advantages
A monolithic OS kernel is faster due to small
source and compiled code size. Less code means also less bugs and security issues. Microkernels • This architecture majorly caters to the problem of ever growing size of kernel code which we could not control in the monolithic approach. • This architecture allows some basic services like device driver management, protocol stack, file system etc to run in user space. • This reduces the kernel code size and also increases the security and stability of OS as we have the bare minimum code running in kernel. So, if suppose a basic service like network service crashes due to buffer overflow, then only the networking service's memory would be corrupted, leaving the rest of the system still functional. In this architecture, all the basic OS services which are made part of user space are made to run as servers which are used by other programs in the system through inter process communication (IPC). eg: we have servers for device drivers, network protocol stacks, file systems, graphics, etc. Microkernel Advantages • Service separation has the advantage that if one service (called a server) fails others can still work so reliability is the primary feature. For example if a device driver crashes does not cause the entire system to crash. Only that driver need to be restarted rather than having the entire system die. This means more persistence as one server can be substituted with another. It also means maintenance is easier. • Different services are built into special modules which can be loaded or unloaded when needed. Patches can be tested separately then swapped to take over on a production instance. • Message passing allows independent communication and allows extensibility • The fact that there is no need to reboot the kernel implies rapid test and development. • Easy and faster integration with 3d party modules Microkernel Disadvantages
• Memory foot print is large
• Potential performance loss (more software interfaces due to message passing) • Message passing bugs are not easy to fix • Process management is complex Diff. b/w Monolithic and MicroKernels: Difference Between Microkernel and Monolithic Kernel Kernel is the core part of an operating system; it manages the system resources. Kernel is like a bridge between application and hardware of the computer. The Kernel can be classified further into two categories, Microkernel and Monolithic Kernel. Microkernel is the one in which user services and kernel services are kept in separate address space. However, in Monolithic kernel user services and kernel services both are kept in the same address space. Let us discuss some more differences between Microkernel and Monolithic kernel with the help of comparison chart shown below.
Content: Micro Kernel Vs Monolithic Kernel
Comparison Chart Definition Comparison Chart
BASIS FOR COMPARISON MICROKERNEL MONOLITHIC KERNEL
Basic In microkernel user services In monolithic kernel, both user and kernel, services are kept in services and kernel services are separate address space. kept in the same address space.
Size Microkernel are smaller in size. Monolithic kernel is larger than
microkernel. Execution Slow execution. Fast execution. Extendible The microkernel is easily The monolithic kernel is hard extendible. to extend. Security If a service crashes, it does If a service crashes, the whole effect on working of system crashes in monolithic microkernel. kernel. Code To write a microkernel, more To write a monolithic kernel, code is required. less code is required.
Example QNX, Symbian, L4Linux, Linux, BSDs (FreeBSD,
Singularity, K42, Mac OS X, OpenBSD, NetBSD), Microsoft Integrity, PikeOS, HURD, Windows (95,98,Me), Solaris, Minix, and Coyotos. OS-9, AIX, HP-UX, DOS, OpenVMS, XTS-400 etc. Definition of Microkernel Microkernel being a kernel manages all system resources. But in a microkernel, the user services and the 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. This reduces the size of the kernel and further reduces the size of operating system
Definition of Monolithic Kernel
The monolithic kernel manages the system resources between application and hardware of the system. But unlike microkernel, the user services and kernel services are implemented under same address space. This increases the size of the kernel further increases the size of operating system. . Hybrid kernel The hybrid approach is derived from the best of both micro and monolithic kernel architectures. Instead of loading the whole thing into memory, core modules are loaded dynamically to memory on demand. One disadvantage is that a module may destabilize a running kernel. Often, "hybrid kernel" means that the kernel is highly modular, but all runs in the same address space. This allows the kernel avoid the overhead of a complicated message passing system within the kernel, while still retaining some microkernel- like features. Hybrid Kernel Architecture: Exokernels
Exokernels provide minimal abstractions,
allowing low-level hardware access. In exokernel systems, library operating systems provide the abstractions typically present in monolithic kernels. An exokernel is a type of operating system where the kernel is limited to extending resources to sub operating systems called LibOS's. Resulting in a very small, fast kernel environment. The theory behind this method is that by providing as few abstractions as possible programs are able to do exactly what they want in a controlled environment. Such as MS-DOS achieved through real mode, except with paging and other modern programming techniques. Thank You…!!!