当前位置:网站首页>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/
边栏推荐
猜你喜欢
随机推荐
IDEA创建Servlet步骤
库函数的模拟实现-C语言
jdbc:mysql://localhost:3306/student?serverTimezone=CTT&useUnicode=true&characterEncoding=utf-8时报错
分布式cache项目
无一技之长学什么可以做到月入上万?
指针运算相关面试题详解【C语言】
升级到 MediaPlayer 11 时跳过验证副本的方法
安装Apache服务时出现的几个问题, AH00369,AH00526,AH00072....
C# 剪裁图片内容区域
Tensorflow/Pytorch安装(Anaconda环境下,无版本冲突,亲测有效)
Shell脚本执行的三种方式
JUC并发容器——跳表
动态内存管理-C语言
ideal life
MySQL基础
Object.requireNonNull 方法说明
strlen 转义字符
JDBC第一学之进行数据库连接时出现The server time zone.....解决办法
数据库实体类对应daoimpl,基础的增删改查。
跑跑飞弹室外跑步AR游戏代码方案设计