目录

QNX介绍

QNX优缺点

qnx 4.0

kernel mode 和user mode 区别

kernel space 和user space 区别

操作系统内核种类: monolithic kernel vs microkernel

kernel serivce包含哪些:

疑问:vxworks为什么是微内核?linux为什么是宏内核

qnx与vxworks区别

windows CE,linux和vxworks 区别

kernel相关名词列表


QNX介绍

QNX的微内核,消息传递,硬实时性,高可靠性,使它在嵌入式领域应用很广。

QNX为微内核的架构,微内核只提供进程调度、进程间通信、底层网络通信和中断处理四种服务。

驱动程序、协议栈、文件系统、应用程序等都在微内核之外内存受保护的安全的用户空间内运行,组件之间能避免相互影响,在遇到故障时也能重启。

因此QNX核心非常小巧 (QNX4.x大约为12Kb)而且运行速度极快。

QNX Neutrino通过两个基本的原则,达到了独一无二的有效性、模块化和简洁性:

  • 微内核架构
  • 基于消息的进程间通信

QNX优缺点

1、遵循POSIX标准,主要使用方式与编程接口与Linux相近,易学习。

2、QNX是一个微内核的系统,你可以任意裁减,定制适合自己的最小化方案。

3、QNX不区分驱动、系统服务和用户运用,可以自由实现。

4、使用群体很小,没有很好的社区支持。出了问题能够提供帮组的人不多。

基本特征、体系结构异同、调度策略分析、操作系统服务比较、系统开放性对比。

实例:

void *mosquitto__thread_main(void *obj)

{

printf("thread st\n");

while(1)

{

pthread_mutex_lock(¤t_out_packet_mutex);

//同一个任务连续上锁,在linux中这里会死锁,但是QNX会返回上锁失败,不会死锁

pthread_mutex_lock(¤t_out_packet_mutex);

printf("thread \n");

pthread_mutex_unlock(¤t_out_packet_mutex);

sleep(1);

}

}

qnx 4.0

qnx是微内核系统

OS模块之间的所有通信都是通过标准的系统IPC服务进行的。因此,由一个资源管理器引入的错误将被限制在该子系统,而不会损坏系统中其他不相关的资源管理器。

下表给出了组成QNX系统的各个模块的源代码行数和代码大小(本文中的所有源代码行数都是通过计算C源文件中的分号生成的)。

代码行数

代码大小

Microkernel

605

7KB

Proc

3924

52KB

Fsys

4457

57KB

Fsys.ahascsi

596

11KB

Dev

2204

23KB

Dev.con

1885

19KB

Net

1142

18KB

Net.ether

1117

17KB

15930行

204KB

refer to https://blog.csdn.net/nibiewuxuanze/article/details/103535875

kernel mode 和user mode 区别

What is basic difference between Kernel mode and User mode?

Kernel Mode: In Kernel mode, the executing code has complete and unrestricted access to the underlying hardware. It can execute any CPU instruction and reference any valid memory address. Any operating system function below the system call layer, executes in kernel mode. Crashes in kernel mode are catastrophic; they will halt the entire PC because there is no other software layer to handle the crashes.

User Mode: In User mode, the executing code has no ability to directly access hardware or reference kernel memory. Code running in user mode must delegate to system APIs to access hardware or kernel memory. Most of the code running on your computer will execute in user mode.

If the CPU doesn’t have an MMU then it doesn’t exist - as kernel mode and user mode are the same.

User mode/Kernel mode is a state of an MMU tied to a processor.

It is used to flag the use of privileged functions (like changing the MMU configuration, perform I/O, handle hardware traps/errors.

Generally the CPU will also provide alternate registers for kernel mode operation.

kernel space 和user space 区别

The really simplified answer is that the kernel runs in kernel space, and normal programs run in user space.

User space is basically a form of sand-boxing -- it restricts user programs so they can't mess with memory (and other resources) owned by other programs or by the OS kernel.

Userspace is just applications running in user mode restricted in access by the MMU, and only able to access the user mode registers.

refer to https://techdifferences.com/difference-between-microkernel-and-monolithic-kernel.html

操作系统内核种类: monolithic kernel vs microkernel

操作系统内核可以分为两大阵营:单内核(亦称:宏内核)和微内核(第三阵营是外内核,主要用在科研系统中)。

内核逻辑+部分用户逻辑运行在kernel mode下,是monolithic kernel

只有kernel服务运行在 kernel mode下,其他逻辑运行在user mode下,则是microkernel

注意:

kernel mode : 逻辑运行在kernel space上。

user mode: 逻辑运行在user space 上。

二者特点:

monolithic kernel: 运行效率高,扩展繁琐。大内核

microkernel: 运行效率稍等,扩展方便。小内核

kernel serivce包含哪些:

任务调度,lower-level中断管理,IPC, low-level网络通讯。

可选:文件管理,内存管理,etc。

Microkernel

  • It is smaller in size.

  • In this kernel, the services are kept in a separate address space.

  • It executes slowly in comparison to monolithic kernel.

  • It can be extended easily.

  • If a service crashes, it effects the working of the microkernel.

  • The code to build a microkernel is large.

  • Examples of microkernel include: QNX, Symbian, L4Linux, Singularity, K42, Integrity, PikeOS, HURD, Minix, Mac OS X, and Coyotos.

Monolithic Kernel

  • In monolithic kernel, both user services and kernel services are kept in the same address space.

  • Monolithic kernel is larger than microkernel.

  • It executes quickly in comparison to microkernel.

  • It is difficult to extend a monolithic kernel.

  • If a service crashes, the entire system crashes when a monolithic kernel is used.

  • Less code is required to build a monolithic kernel.

  • Examples of monolithic kernel include: Linux, BSDs (FreeBSD, OpenBSD, NetBSD), OS-9, AIX, HP-UX, DOS, OpenVMS, XTS-400, Microsoft Windows (95,98,Me), and Solaris.

BASIS FOR COMPARISON MICROKERNEL MONOLITHIC KERNEL
Basic In microkernel user services and kernel services are kept in separate address space. In monolithic kernel, both user services and kernel services are 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 extendible. The monolithic kernel is hard to extend.
Security If a service crashes, it does effect on working of microkernel. If a service crashes, the whole system crashes in monolithic kernel.
Code To write a microkernel, more code is required. To write a monolithic kernel, less code is required.
Example QNX, Symbian, L4Linux, Singularity, K42, Mac OS X, Integrity, PikeOS, HURD, Minix, and Coyotos. Linux, BSDs (FreeBSD, OpenBSD, NetBSD), Microsoft Windows (95,98,Me), Solaris, OS-9, AIX, HP-UX, DOS, OpenVMS, XTS-400 etc.

Monolithic-kernel单内核

疑问:vxworks为什么是微内核?linux为什么是宏内核

解释:

vxworks内核中,只提供系统服务,没有用户服务。 只是user space和kernel space一致。看起来像monolithic  kernel。

linux内核是monolithic,虽然也区分了user space和kernel space。单kernel space中运行了大量的user service。

qnx与vxworks区别

vxworks是micro kernel。单7.0之前的版本,所有逻辑都运行在内核空间(不是 kernel mode),因而很像monolithic kernel.

If any service fails the entire system crashes, and it is one of the drawbacks of this kernel. The entire operating system needs modification if user adds a new service.

二者区别是:

vxworks 7之前的版本,使用统一地址空间方式。

vxworks7及之后,区分kernel space和user space。

qnx始终,区分内核空间和用户空间。

此处vxworks是monolithic kernel,有误。

windows CE,linux和vxworks 区别

refer to https://www.ripublication.com/ijaer17/ijaerv12n18_113.pdf

kernel相关名词列表

Operating systems

General
  • Advocacy
  • Comparison
  • Forensic engineering
  • History
  • Hobbyist development
  • List
  • Timeline
  • Usage share
  • User features comparison
Variants
  • Disk operating system
  • Distributed operating system
  • Embedded operating system
  • Mobile operating system
  • Network operating system
  • Object-oriented operating system
  • Real-time operating system
  • Supercomputer operating system
Kernel
Architectures
  • Exokernel
  • Hybrid
  • Microkernel
  • Monolithic
  • vkernel
  • Rump kernel
  • Unikernel
Components
  • Device driver
  • Loadable kernel module
  • User space
Process management
Concepts
  • Computer multitasking (Cooperative, Preemptive)
  • Context switch
  • Interrupt
  • IPC
  • Process
  • Process control block
  • Real-time
  • Thread
  • Time-sharing
Scheduling
algorithms
  • Fixed-priority preemptive
  • Multilevel feedback queue
  • Round-robin
  • Shortest job next
Memory management,
resource protection
  • Bus error
  • General protection fault
  • Memory protection
  • Paging
  • Protection ring
  • Segmentation fault
  • Virtual memory
Storage access,
file systems
  • Boot loader
  • Defragmentation
  • Device file
  • File attribute
  • Inode
  • Journal
  • Partition
  • Virtual file system
  • Virtual tape library
Supporting concepts
  • API
  • Computer network
  • HAL
  • Live CD
  • Live USB
  • Shell 
    • CLI
    • GUI
    • 3D GUI
    • NUI
    • TUI
    • VUI
    • ZUI
  • PXE

refer to https://en.wikipedia.org/wiki/Monolithic_kernel

QNX和linux的区别 -- qnx4.0 内核介绍 -- 微内核 -- qnx与vxworks区别相关推荐

  1. 《Linux设备驱动开发详解(第3版)》(即《Linux设备驱动开发详解:基于最新的Linux 4.0内核》)进展同步更新

    本博实时更新<Linux设备驱动开发详解(第3版)>的最新进展. 目前已经完成稿件. 2015年8月9日,china-pub开始上线预售: http://product.china-pub ...

  2. 宏内核与微内核、Linux内核与Unix内核的区别

    宏内核:简单来说,就是把很多东西都集成进内核,例如linux内核,除了最基本的进程.线程管理.内存管理外,文件系统,驱动,网络协议等等都在内核里面.优点是效率高.缺点是稳定性差,开发过程中的bug经常 ...

  3. Linux设备驱动开发详解 第3版 (即 Linux设备驱动开发详解 基于最新的Linux 4 0内核 )前言

    Linux从未停歇脚步.Linus Torvalds,世界上最伟大的程序员之一,Linux内核的创始人,Git的缔造者,仍然在没日没夜的合并补丁,升级内核.做技术,从来没有终南捷径,拼的就是坐冷板凳的 ...

  4. linux内核和发行版有什么区别?附镜像包以及如何查看Linux系统内核版本和发行版本

    linux内核和发行版的区别是:linux内核安装完成后没有用户界面和软件,是提供硬件抽象层.硬盘以及文件系统控制的核心程序:而linux发行版是在内核的基础上加入了用户界面和各种软件的支持. lin ...

  5. linux内核中的GFP_KERNEL和GFP_ATOMIC区别

    linux内核中的GFP_KERNEL和GFP_ATOMIC区别 作用 区别 作用 用来标记分配内核空间内存时的方式 区别 如果内存不够时,会等待内核释放内存,直到可以分配相应大小的内存,也就意味着会 ...

  6. DebEX 现在支持 Linux 5.0 内核 和 Budgie Desktop 10.4

    开发四年只会写业务代码,分布式高并发都不会还做程序员? >>>   DebEX Build 190128 在 Budgie 10.4 桌面环境中已经可以使用,该版本是一个即将发布的基 ...

  7. linux内核区分cpu架构,一文读懂处理器,内核,芯片三个概念的区别

    一.处理器简介 处理器一般指中央处理器.中央处理器(CPU,Central Processing Unit)是一块超大规模的集成电路,是一台计算机的运算核心(Core)和控制核心( Control U ...

  8. Ubuntu 19.04(Disco Dingo)将采用 Linux 5.0 内核

    开发四年只会写业务代码,分布式高并发都不会还做程序员?   Canonical 决定将即将发布 Ubuntu19.04(disco dingo)操作系统与新的内核系列(即最近发布的Linux5.0内核 ...

  9. Linux内核源码分析:基于最新的Linux 4.0内核(学习路线总结)

    今天给大家分享的是基于最新的Linux 4.0内核学习路线总结,本文由8个专题组成,文末附上学习路线思维导图. 一.进程管理专题 1.进程原理 1.1 进程生命周期 1.2 task_struct结构 ...

  10. linux内核wifi,8192DU双频wifi模块移植到linux3.6.0内核

    1.1 下载驱动代码 官方网站()上需找自己匹配的型号的驱动,这里我们使用的是8192du型号的wifi芯片,所以下载匹配的wifi驱动,还有就是使用的linux内核要在官方所指定的版本范围内,这部分 ...

最新文章

  1. ISP算法高水平分析(上)
  2. 在wpf中运行EXE文件
  3. Oracle表空间文件损坏后的排查及解决
  4. Bootstrap之Carousel不能自动播放的解决办法(转)
  5. 从零开始学ASP.NET
  6. 病毒式营销案例:多芬让“病毒”的诱惑自发传递
  7. Qt Dock Widgets 官方示例的翻译
  8. 前端常见知识点四之webscoket
  9. 第3章 Linux内核调试手段之三
  10. python入门基础系列_03python—9个基础常识-python小白入门系列
  11. 山东大学 2020级数据库系统 实验六
  12. It企业的上市与退市
  13. 2018最新Web前端经典面试试题及答案
  14. NSObject的hash方法
  15. Linux中vi的使用
  16. Unity3D游戏开发之路:一月工作总结
  17. 投资体系-01-房产投资-普通购房者和投资者 分水岭
  18. C语言中常用的标准数学函数
  19. 问题 G(1203): 【基础算法】0/1字符串问题
  20. Android ImageView: resolveUri failed on bad bitmap uri

热门文章

  1. 数据库设计中的概念、逻辑、物理结构设计辨析
  2. 转载:BGA封装芯片手工焊接攻略
  3. 前端自动化测试 之 视觉测试
  4. 微信小程序Audio音频(有关歌曲和图片的路径)
  5. 001:汉洛塔(递归)
  6. 鸡啄米:C++编程入门系列之六(算法的基本控制结构之选择结构)
  7. Coursera machine learning week 6 excise
  8. python闲鱼监控_推荐一个可玩的爬虫开源项目-闲鱼部分我已经测试过
  9. java和springboot开发的租房app房东直租系统租房网站
  10. gophp解释器_golang底层用什么语言实现的