OS(操作系统)C# 编程
我知道这个项目。问题是“我们可以使用托管代码创建一个真正的操作系统吗?或者使用该项目创建的操作系统是一个 hello world 操作系统吗?” 操作系统需要对硬件有完全的控制权。我们可以用这个来做到这一点吗? 如果还有其他项目请告诉我
Cosmos 项目
I know this project.The question is that "Can we create a real OS with Managed Code or the os that will create with this project is a hello world os?"
Operating Systems need to have full control on hardware.Can we do it with this one?
If there are any another project please tell me
Cosmos Project
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,可以做到 - 请参阅 Singularity,它是(曾经)是一个 Microsoft 研究项目在“Sing#”(“Spec#”的扩展版本,它本身就是 C# 的扩展)中创建一个完全托管的操作系统。 值得强调的是,这只是这个概念的一个研究项目,从来没有打算成为 Windows 或 Max OSX 等“完整”操作系统。
源代码可在 CodePlex - 你可以下载代码,构建它并在模拟器中自己运行它(我自己做过,它很好尽管我自己不记得确切的步骤,但已记录且相对容易)。
系统的某些部分是用汇编/C 编写的,特别是引导加载程序和最低级别的 x86 中断调度代码,但这基本上是不可避免的(就其本质而言,它非常依赖于平台 - 某些东西需要编写 x86 指令来控制和响应基本硬件)。就操作系统的实际功能而言,低级中断也不是特别有趣,因此我个人并不认为这是欺骗“完全托管”的定义。
查看 Singularity 的 Wikipedia 页面,还有 5-6 个类似的项目,包括 Cosmos 和一些使用 Java 而不是 C# 的类似尝试。
Singularity OS 的重点是安全性和依赖性,但同样令人印象深刻的是,根据 概述在 Singularity Project1 (PDF) 中,其架构的性能实际上与其他“更传统”的操作系统相当:
Yes it can be done - see Singularity which is (was) a Microsoft research project to create an entirely managed operating system in "Sing#" (an extended version of "Spec#" which is itself an extension of C#). Its worth stressing that this was just a research project into the concept, and was never intended as a "full" operating system of the likes of Windows or Max OSX.
The source code is available on CodePlex - you can download the code, build it and run it yourself in an emulator (I've done it myself, its well documented and relativley easy although I can't remember the exact steps myself).
Parts of the system were written in assembly / C, specifically the bootloader and the lowest level x86 interupt dispatch code however this is essentially all but unavoidable (it is by its very nature very platform dependant - something needs to write the x86 instructions to control and respond to basic hardware). The low level interrupts are also not particularly interesting in terms of how the operating system actually functions, so I personally don't consider this as cheating the "entirely managed" definition.
Looking on the Wikipedia page for Singularity there are also 5-6 similar projects, including Cosmos and a couple of similar attempts that use Java instead of C#.
The focus of Singularity OS was on security and dependency, however whats also impressive is that according to some basic benchmarks in An Overview of the Singularity Project1 (PDF) the performance of their archetecture was actually comparable to that of other "more conventional" operating systems: