当前位置:网站首页>Operating System Kernel
Operating System Kernel
2022-08-04 05:33:00 【学习溢出】
Operating System Kernel
Kernel is the core part of operating system and responsible for all major activities of this operating system.
Kernel consists of various modules and it interacts directly with the low level hardware.
| Kernel | Operating System |
|---|---|
| Kernel is the core part of operating system | Operating system (OS) is a collection of software that manages computer hardware resources |
| It acts as an interface between software and hardware of the computer system. | It acts as an interface between user and hardware of the computer |
| It plays an important role in memory management, task management, process management and disk management. | It responsible for protection and security of the computer system. |
| Monolithic Kernel and Micro kernel are the two types of kernel. | Single and Multiprogramming batch system, Distributed operating system, Real-time operating system are the types of operating system. |
Monolithic Kernel (UNIX):
All operating system services run along the main kernel thread in a monolithic kernel, which also resides in the same memory area, thereby providing powerful and rich hardware access.
Advanages:
- Process fast because of small sourse and compiled code size
- Less bugs and more security because of less code
Disadvanages:
- Hard to debug and testing takes more time
- Hard to maintain, patch (补丁), extend
Micro Kernel (Mac OS):
Define a simple abstraction over hardware that use primitives or system calls to implement minimum OS services such as multitasking, memory management and interprocess communication.
Advanages:
- Service separation has the advantage that if one service fails others can still work so reliability is the primary feature. This 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.
Disadvanages:
- 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
Difference between Monolithic Kernel and Micro Kernel
| Comparison between Monolithic Kernel vs MicroKernel | Monolithic Kernel | MicroKernel |
|---|---|---|
| Execution Style | All processes are executed under the kernel space in privileged mode | Only the most important processes take place in the Kernel space. All other processes are executed in the user space |
| Size | Kernel size is bigger when compared to Microkernel | Kernel size is smaller with respect to the monolithic kernel |
| Speed | It provides faster execution of processes | Process execution is slower |
| Stability | A single process crash will cause the entire system to crash | A single process crash will have no impact on other processes |
| Inter-Process Communication | Use signals and sockets to achieve interprocess communication | Use messaging queues to achieve interprocess communication |
| Extensibility | Difficult to extend | Easily extensible |
| Maintainability | Maintenance is more time and resource consuming | Easily maintainable |
| Debug | Harder to debug | Easier to debug |
| Security | Less Secure | More Secure |
| Example | Linux | Mac OS |
Preemptive Kernel:
A preemptive kernel is where the kernel allows a process to be removed and replaced while it is running in kernel mode.
- complex soultion
- better responsiveness
- eliminates risk of excessively long kernel code activities
Non-Preemptive Kernel:
A nonpreemptive kernel does not allow a process running in kernel mode to be preempted;
- simple solution
- eliminates OS Race Conditions
Race Conditions
Race Conditions = Technical Term means two or more processes Read/Write on Shared data
Reference
https://www.tutorialspoint.com/what-is-the-difference-between-a-kernel-and-an-operating-system
https://www.educba.com/monolithic-kernel-vs-microkernel/
https://www.8bitavenue.com/monolithic-vs-microkernel-os-architectures/
边栏推荐
猜你喜欢
随机推荐
An abstract class, internal classes and interfaces
JVM三大常量池与方法区
第九篇 ApplicationContext初始化
文件权限管理 ugo
基于Event Stream操作JSON
Treating as key frame since WebRTC-SpsPpsIdrIsH264Keyframe is disabled 解决
Janus转发丢包导致音视频不同步原因分析
Uos统信系统 DISK(RAID+LVM)
MySQL基础
给想要转行渗透测试人的忠告
【HIT-SC-MEMO1】哈工大2022软件构造 复习笔记1
[Daily Office][Miscellaneous][vscode]tab space
Pipe redirection
结构体内存对齐-C语言
虚幻引擎 5 完整指南[2022六月最新课程学习内容]
基于Webrtc和Janus的多人视频会议系统开发6 - 从Janus服务器订阅媒体流
vs2017 redist 下载地址
LeetCode_Dec_1st_Week
Uos统信系统 chrony配置
Miscellaneous [development] [VS Code] remote - SSD retry failed









