编写操作系统的编程模型 [英] programming models in writing o.s

查看:105
本文介绍了编写操作系统的编程模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们:)
我有一个问题:
在编写操作系统时使用哪种编程模型(结构化,oop等)?
例如,在linux和unix中,使用哪种编程模型?

hi guys :)
i have a question:
during writing an o.s which programming models is used(structured,oop,...)?
for example in linux and unix which programming model is used?

推荐答案

即使在单个OS中,也没有您所指的级别的单个模型.
新系统中使用的编程模型差异太大,无法做出合理的答案.
我认为,如果您打算写自己的书,则需要做出自己的决定-对现有OS的了解越少,您的价值就越大(当然,如果成功的话).

Linux不是面向对象的,可能与每个Unix一样(但是我不能保证),但是其他一些则是面向对象的(值得注意的例子是Singularity ^ ]).

操作系统的最常见分类基于模块化概念,尤其是内核的相对大小以及它们的独立性(微内核,混合内核,整体内核等,请参见http://en.wikipedia.org/wiki/Micro_kernel [ ^ ]).

—SA
There is no a single model of the level you mean even in a single OS.
The programming models used in new systems are too different to make any sensible answer.
I think if you aim to write you own you need to make your own decision — the less you look behind at existing OS, the more valuable might be yours (in case of success, of course).

Linux is not object-oriented, probably as every Unix (but I cannot guarantee that), but some others are deeply object-oriented (notable example is Singularity http://en.wikipedia.org/wiki/Singularity_(operating_system)[^]).

Most common classification of OS is based on the modularity concept, especially relative sizes of the kernel and how independent they are (Microkernel, Hybrid kernel, Monolithic kernel, etc., see http://en.wikipedia.org/wiki/Micro_kernel[^]).

—SA


这是对SAKryukov答案的详尽阐述-也是一种在微控制器之上享受单片内核优势的方法核心.两全其美:)

我会看一下 Fiasco µ-kernel [
L4Linux [
Think of this as an elaboration on SAKryukov''s answer - and a way to enjoy the benefits of a monolithic kernel on top of a micro-kernel. The best of both worlds :)

I''d take a look at Fiasco µ-kernel[^]. It''s a C++ implementation of the L4 kernel interface that is fully preemptible. It will let you support "hard real-time" requirements.

L4Linux[^] runs on top of Fiasco, turning this into an extremly interesting architecture.

Regards
Espen Harlinn


这篇关于编写操作系统的编程模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆