orange's 一个操作系统的实现源代码

上传者: chenjingli1988 | 上传时间: 2021-09-17 16:21:23 | 文件大小: 405KB | 文件类型: GZ
对x86架构的处理器,业界一向是褒贬不一。但是毫无疑问的是,x86架构的处理器是迄今为止在市场上最成功的处理器。它既催生了Intel、微软这样的业界巨头,也改变了普通人们的生活。到今天,虽然有arm的异军突起,但是大部分程序员所编写的程序依然在运行在x86架构上。 虽然很多上层的程序员绕过了对CPU架构本身的理解,而直接使用高级语言进行编程,但是对CPU本身的熟悉,其实依然是所有想被称为优秀的程序员所难以绕过的一道坎。对CPU的不熟悉,实际上限制了程序员的思维方式、对程序的理解和实际解决问题的能力。 对于普通的芯片,阅读几页的说明书就可以大致理解如何让它工作。CPU是比较复杂的一种,对于比较简单的CPU架构,阅读几十页的文档也能大致熟悉。然而 x86架构的CPU的说明可不是这么简单,其手册估计有一共有四、五千页之巨。不要说理解透彻,就是从头到尾翻一遍也不是一件简单的事情。并非Intel 有意将它做得复杂,这里有历史的原因。因为这个架构的应用实在太广了,全世界有无数的软件都在它的基础之上工作。为此它自身的升级也就变得举步维艰。每次升级都不得不要兼容之前的特性。这也就导致了新旧指令层层堆积,种种特性互相兼顾,最终变成如今的一团乱麻了。 对于入门级的选手,读完那些手册可不是一件容易的事情。但是于渊的这本《orange's:一个操作系统的实现》却是一条难得的终南捷径。因为要理解如何让一个芯片正常工作,最简单的办法就是从头开始去写程序让它运行起来,然后操作它做自己想做的事情。如果是平时的编程,这些下层的工作都已经有操作系统帮你做了,对理解x86架构的帮助就大为有限。如果去读那几千页的文档,不但读起来很痛苦,中间又没有多少可以实际操作的工作来帮助你温故而知新,这其中的枯燥乏味,绝对不是一般人可以忍受的了。而且更重要的手册中虽然包含了x86所有的特性,然而其中有些特性是现代操作系统根本就没有用到的。努力的去理解的话,又是吃力不讨好了。如果每个读者都可以随着这本书的介绍,去逐步的实现一个操作系统,不但这中间其乐无穷,而且实现到最后,对x86架构的理解也就不在话下。

文件下载

资源详情

[{"title":"( 76 个子文件 405KB ) orange's 一个操作系统的实现源代码","children":[{"title":"oranges","children":[{"title":"a.img <span style='color:#111;'> 1.41MB </span>","children":null,"spread":false},{"title":"bochsrc <span style='color:#111;'> 1001B </span>","children":null,"spread":false},{"title":"mm","children":[{"title":"main.c <span style='color:#111;'> 3.66KB </span>","children":null,"spread":false},{"title":"forkexit.c <span style='color:#111;'> 8.77KB </span>","children":null,"spread":false},{"title":"exec.c <span style='color:#111;'> 3.08KB </span>","children":null,"spread":false}],"spread":true},{"title":"boot","children":[{"title":"boot.asm <span style='color:#111;'> 9.78KB </span>","children":null,"spread":false},{"title":"loader.asm <span style='color:#111;'> 29.96KB </span>","children":null,"spread":false},{"title":"include","children":[{"title":"load.inc <span style='color:#111;'> 1.52KB </span>","children":null,"spread":false},{"title":"fat12hdr.inc <span style='color:#111;'> 2.17KB </span>","children":null,"spread":false},{"title":"pm.inc <span style='color:#111;'> 13.55KB </span>","children":null,"spread":false}],"spread":true},{"title":"hdboot.asm <span style='color:#111;'> 5.88KB </span>","children":null,"spread":false},{"title":"hdldr.asm <span style='color:#111;'> 24.00KB </span>","children":null,"spread":false}],"spread":true},{"title":"100m.img <span style='color:#111;'> 99.91MB </span>","children":null,"spread":false},{"title":"fs","children":[{"title":"main.c <span style='color:#111;'> 17.13KB </span>","children":null,"spread":false},{"title":"read_write.c <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false},{"title":"link.c <span style='color:#111;'> 5.93KB </span>","children":null,"spread":false},{"title":"disklog.c <span style='color:#111;'> 24.56KB </span>","children":null,"spread":false},{"title":"open.c <span style='color:#111;'> 11.82KB </span>","children":null,"spread":false},{"title":"misc.c <span style='color:#111;'> 5.52KB </span>","children":null,"spread":false}],"spread":true},{"title":"include","children":[{"title":"type.h <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"string.h <span style='color:#111;'> 979B </span>","children":null,"spread":false},{"title":"sys","children":[{"title":"keyboard.h <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false},{"title":"console.h <span style='color:#111;'> 913B </span>","children":null,"spread":false},{"title":"sconst.inc <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"config.h <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"fs.h <span style='color:#111;'> 4.27KB </span>","children":null,"spread":false},{"title":"keymap.h <span style='color:#111;'> 7.65KB </span>","children":null,"spread":false},{"title":"protect.h <span style='color:#111;'> 5.20KB </span>","children":null,"spread":false},{"title":"proto.h <span style='color:#111;'> 4.12KB </span>","children":null,"spread":false},{"title":"tty.h <span style='color:#111;'> 815B </span>","children":null,"spread":false},{"title":"proc.h <span style='color:#111;'> 3.44KB </span>","children":null,"spread":false},{"title":"global.h <span style='color:#111;'> 1.68KB </span>","children":null,"spread":false},{"title":"const.h <span style='color:#111;'> 8.17KB </span>","children":null,"spread":false},{"title":"hd.h <span style='color:#111;'> 11.38KB </span>","children":null,"spread":false}],"spread":false},{"title":"stdio.h <span style='color:#111;'> 3.56KB </span>","children":null,"spread":false}],"spread":true},{"title":"kernel","children":[{"title":"hd.c <span style='color:#111;'> 15.66KB </span>","children":null,"spread":false},{"title":"main.c <span style='color:#111;'> 9.57KB </span>","children":null,"spread":false},{"title":"global.c <span style='color:#111;'> 2.94KB </span>","children":null,"spread":false},{"title":"i8259.c <span style='color:#111;'> 2.08KB </span>","children":null,"spread":false},{"title":"systask.c <span style='color:#111;'> 2.94KB </span>","children":null,"spread":false},{"title":"kernel.asm <span style='color:#111;'> 13.14KB </span>","children":null,"spread":false},{"title":"start.c <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"protect.c <span style='color:#111;'> 9.36KB </span>","children":null,"spread":false},{"title":"keyboard.c <span style='color:#111;'> 10.06KB </span>","children":null,"spread":false},{"title":"proc.c <span style='color:#111;'> 17.76KB </span>","children":null,"spread":false},{"title":"tty.c <span style='color:#111;'> 13.83KB </span>","children":null,"spread":false},{"title":"klib.c <span style='color:#111;'> 4.10KB </span>","children":null,"spread":false},{"title":"console.c <span style='color:#111;'> 10.70KB </span>","children":null,"spread":false},{"title":"kliba.asm <span style='color:#111;'> 5.91KB </span>","children":null,"spread":false},{"title":"clock.c <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false}],"spread":false},{"title":"scripts","children":[{"title":"splitgraphs <span style='color:#111;'> 402B </span>","children":null,"spread":false},{"title":"genlog <span style='color:#111;'> 1.05KB </span>","children":null,"spread":false},{"title":"invalidate.hd <span style='color:#111;'> 389B </span>","children":null,"spread":false}],"spread":true},{"title":"command","children":[{"title":"start.asm <span style='color:#111;'> 212B </span>","children":null,"spread":false},{"title":"echo.c <span style='color:#111;'> 167B </span>","children":null,"spread":false},{"title":"Makefile <span style='color:#111;'> 1.27KB </span>","children":null,"spread":false},{"title":"pwd.c <span style='color:#111;'> 103B </span>","children":null,"spread":false}],"spread":true},{"title":"Makefile <span style='color:#111;'> 5.28KB </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"syslog.c <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"wait.c <span style='color:#111;'> 1.20KB </span>","children":null,"spread":false},{"title":"exec.c <span style='color:#111;'> 2.60KB </span>","children":null,"spread":false},{"title":"fork.c <span style='color:#111;'> 1.40KB </span>","children":null,"spread":false},{"title":"stat.c <span style='color:#111;'> 1.24KB </span>","children":null,"spread":false},{"title":"string.asm <span style='color:#111;'> 3.53KB </span>","children":null,"spread":false},{"title":"write.c <span style='color:#111;'> 1.33KB </span>","children":null,"spread":false},{"title":"vsprintf.c <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"exit.c <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"getpid.c <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"read.c <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"lseek.c <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false},{"title":"unlink.c <span style='color:#111;'> 1.21KB </span>","children":null,"spread":false},{"title":"syscall.asm <span style='color:#111;'> 1.37KB </span>","children":null,"spread":false},{"title":"close.c <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"printf.c <span style='color:#111;'> 3.99KB </span>","children":null,"spread":false},{"title":"open.c <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"misc.c <span style='color:#111;'> 5.35KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true}]

评论信息

  • qq_20155317 :
    可以参考一下
    2015-11-03
  • yu_2005 :
    代码都可用,我是用过了,才来评价的
    2015-06-02
  • tadeyima :
    有一些实用价值
    2015-06-01
  • shaojianqing2011 :
    自己在写一个操作系统,有问题了,参考下书中的代码和思想还是不错的,至少提供了一种方法去解决。
    2015-05-09
  • h1e2i3 :
    是orange's的源代码,照着书中的步骤学习效果很好
    2015-05-07

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明