为x86体系结构开发操作系统 [英] Developing an operating system for the x86 architecture

查看:117
本文介绍了为x86体系结构开发操作系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正计划为x86体系结构开发一个操作系统.

I am planning to develop an operating system for the x86 architecture.

  • 我可以使用哪些编程语言?
  • 有哪些类型的编译器可用,最好在Windows环境中可用?
  • 有没有什么好的资源可以帮助我了解有关操作系统开发的更多信息?
  • 在虚拟机或物理硬件上测试操作系统是否更好?

有什么建议吗?

推荐答案

在我拼贴画的最后一个项目中,我开发了一个小型x86 OS,带有虚拟内存管理器,虚拟文件​​系统和完全抢占式多任务处理.我将其设为开放源代码,并且对该代码进行了大量注释,请在以下位置查看其源伪造页面:

For my final year project in collage I developed a small x86 OS with a virtual memory manager, a virtual file system and fully preemptive multitasking. I made it open source and the code is heavily commented, check out its source forge page at:

https://github.com/stephenfewer/NoNameOS

根据我的经验,我可以推荐以下内容:

From my experience I can recommend the following:

需要为各种零件使用x86汇编语言,这是不可避免的,但可以将其降至最低.很快,您就会运行C代码,这是OS开发的公认之选.一旦有了某种可用的内存管理器,就可以根据需要使用C ++(需要使用某种内存管理器来进行诸如new和delete之类的操作).

You will need x86 assembly language for various parts, this in unavoidable, but can be kept to a minimum. Fairly quickly you will get running C code, which is a proven choice for OS development. Once you have some sort of memory manager available you can go into C++ if you like (you need some kind of memory manager for things like new and delete).

无论您选择哪种语言,都仍然需要组装& C键,使系统从引导进入BIOS的状态变为可用形式.

No matter what language you choose you will still need assembly & C to bring a system from boot where the BIOS leaves you into any useable form.

最终,您选择的主要语言将取决于您要开发的操作系统的类型.

Ultimately, the primary language you choose will depend on the type of OS you want to develop.

我的开发环境是GNU开发工具 DJGPP 的Windows端口以及 NASM 汇编程序.对于我的 IDE ,我将IBM的Eclipse与

My development environment was the Windows port of the GNU development tools DJGPP along with the NASM assembler. For my IDE I used IBM's Eclipse with the CDT plugin which provides a C/C++ development environment within Eclipse.

对于测试,我建议使用 BOCHS ,这是一种开放源代码x86 PC仿真器.它可以让您快速启动操作系统,这非常适合测试,并且可以集成到eclipse中,因此您只需按一下按钮就可以构建和运行操作系统.我还建议您偶尔使用VMWare和物理PC,因为这样可以发现一些细微的错误.

For testing I recommend BOCHS, an open source x86 PC emulator. It lets you boot up your OS quickly which is great for testing and can be integrated into eclipse so you can build and run your OS at the push of a button. I would also recommend using both VMWare and a physical PC occasionally as you can pick up on some subtle bugs that way.

P.S.操作系统开发确实很有趣,但是非常密集,我花了12个月的大部分时间.我的建议是计划周密,而您的设计是关键!享受:)

P.S. OS development is really fun but is very intensive, mine took the best part of 12 months. My advice is to plan well and your design is key! enjoy :)

这篇关于为x86体系结构开发操作系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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