RTOS eCos 使用什么内核类型?

What kernel type does the RTOS eCos use?

根据我的研究,我无法找到 eCos 中使用的内核类型,例如单片内核或微内核。从我的研究中我只能发现内核是实时内核或网站只是将其描述为 eCos 内核,这是否意味着它是定制内核?

我对 eCos 的了解是它是一个硬 RTOS,尽管在安全性方面有点脆弱,使用优先级,基于队列的调度。

我认为它是一个单片内核。如果您查看此页面:http://ecos.sourceware.org/getstart.html

它用于代替 linux 内核并且 linux 内核支持单片内核。此外,如果是微内核,他们会突出显示内核类型,如 QNX 内核类型,即微内核

一个micro-kernel是:

... the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, thread management, and inter-process communication (IPC). (Wikipedia 11 Dec 2018)

eCos 内核在其 Reference Manual 中描述如下:

It provides the core functionality needed for developing multi-threaded applications:

  1. The ability to create new threads in the system, either during startup or when the system is already running.

  2. Control over the various threads in the system, for example manipulating their priorities.

  3. A choice of schedulers, determining which thread should currently be running.

  4. A range of synchronization primitives, allowing threads to interact and share data safely.

  5. Integration with the system's support for interrupts and exceptions.

对比这些描述很明显是微内核。 eCos 提供的其他服务(例如文件系统、网络和设备驱动程序)是外部的,可与内核分离。也就是说,你可以在没有这些服务的情况下单独部署内核,它仍然是可行的。

在单体内核中,这些服务很难或不可能分开,因为它们是整体的固有部分。与大多数其他 RTOS 的 eCos mand 不同,它们不能很好地扩展到嵌入式系统中常见的小型硬件平台。单片内核适用于桌面和通用计算平台,因为平台本身是单片的——没有文件系统、显示器、键盘等的 PC 是不可行的,而在嵌入式系统中则不然。

虽然Linux,甚至Windows用于嵌入式系统,微内核可部署在具有几十千字节内存的平台上,而最小的嵌入式Linux 例如需要几个 兆字节 并将包含大量您的应用程序可能永远不会使用的代码。

最终,区别可能是无关紧要的,术语也是如此。就是这样。您不会根据此标准选择您的内核或 OS,而是它是否提供您需要的服务、是否在您的目标上运行以及是否适合可用资源。