
于2010-12-23 10:33:07翻译 | 已有2235人浏览 | 有4人评论
这是一篇初步介绍开发操作系统的文章
Introduction
介绍
From OSDev Wiki
来自OSDev维基百科 http://wiki.osdev.org/Introduction
Jump to: navigation, search
在这里输入译文
Welcome
欢迎
Welcome to Operating System development; the great frontier.
欢迎来到(学习)操作系统开发最好的地方
Not all "make it" in this field, many don't even pass the "Hello World" of OSDev, but perhaps you will go further and create the next Linux? Or Windows? Or are your goals lower - MenuetOS? Or even CP/M?
在操作系统这个领域里,并不是所有的地方都给人探讨过(也就是说,还有很大的发展),很多人甚至连在操作系统方面哪怕最原始的一点开发都没有进行过,不过,有可能,你会通过在这个网站的学习,你会深入理解操作系统或者甚至开发了一个新的Linux?或者Windows?.又或者,你的目标比较低----搞一个MenuetOS?或是一个CP/M。
Whatever your goals, OSDev'ing is the great pinnacle of programming. But, you're not alone. In fact, this entire website, including the forums and this Wiki, are dedicated to OSDev'ing. This is not only about great programming skills, but is about community and developing friendships. Be those friendships between fellow forum members or IRQs and processes.
不管你的目标是什么,进行操作系统的开发,就是程序设计的顶峰。不过,在这一方面,你并不是一个人在独战,事实上,整个网站,包括这个论坛(http://forum.osdev.org/)和这个网站的维基,都是专注于操作系统开发的。进行操作系统开发,在这里,并不单单是关于优秀的编程能力,还关于一个社区(如何协助,互相帮助)和开发者之间的友谊.让这友谊在论坛用户和IRQ用户之间存在,并继续发展下去。
What do you need to succeed in OSDeving? You should read the Getting Started article.
想在系统开发这一块上成功,你需要什么呢------你应该先阅读这篇关于怎么开始的文章(http://wiki.osdev.org/Getting_Started)。
Do you want to read a step-by-step tutorial to writing a basic kernel you can build upon? You should read Bran's Kernel Development Tutorial, and the article about Bran's Known Bugs. Once you know the bare basics, you may find some more tutorials at the Tutorials page.
你想通过阅读一步一步指导你的教程,来完成一个你可以写出来的基本内核的话,那么,你就要阅读Brans ´s 的内核开发教程(http://www.osdever.net/bkerndev/Docs/intro.htm),还有这一篇有关Bran ´s 所知道的(关于他所写的内核的)Bugs。一旦你掌握了基本的知识后,你还可以在指导页面上(http://wiki.osdev.org/Tutorials)找到更多的指导文章。
Good luck! :)
祝你旅程顺利!:)
What is an Operating System?
操作系统是一个什么东西?
Computer systems in general are a finite resource. Their entire purpose is to execute a set of instructions, something we commonly call a "program". This concept has not changed much over the years. Early main-frame system administrators had the job of taking program execution requests, assigning them a priority, and giving them a time frame to run. These concepts are the basis of any operating system, they just tend to occur thousands of times per second. The operating system can allow execution of multiple programs so quickly that it is virtually unnoticeable to a human user, making it seem as all the programs are running at the same time. Many things have to occur in order to allow multiple programs to execute in such a manner. The priority is safety, because if the system crashes and becomes unusable, not much else matters. Second is security, denying the capability of malicious programs, such as viruses and worms, to wreak havoc on the system is a must. Even more so is security-related software, denying access to such software's memory space is imperative. The last major issue is speed; If software runs slow or takes up valuable system resources, it makes a run-away impact on the rest of the system.
宽泛的说,计算机系统是一组有限的资源。它存在的最主要的目的,就是为了执行一组指令,我们通常称这些被执行的指令为程序。从计算机出现到现在,这个概念并没有改变多少。早期,大型机的管理员,要做这样一些工作-----接收程序执行的请求,给程序分配相应的优先级,然后,分给程序一个运行的时间段。这些概念是所有操作系统的基础,(不同的是)现在,这些概念所表示的执行过程,是每秒钟发生上千次。操作系统可以快速执行和响应程序,对计算机用户来说,这个执行过程难以被注意到的(因为太快了)。这也让我们觉得,操作系统好像同时执行了多道程序。要让多道程序按照上面这种方式进行,那么,这当中涉及到很多的步骤,有很多的事情要做。首先为程序设定优先级,这让系统更加健壮,因为,没有什么东西比系统崩溃了或者不可用更加糟糕的事情了。第二个要考虑的是机密性,阻止注入型的程序运行,比如病毒和蠕虫,防止它们破坏系统,这是必须的。另外要考虑的是,防止注入型的程序访问机密程序的内存空间,这也是要考虑的标准之一。最后一个要考虑的是,速度问题----如果一个程序运行得很慢并且占用了大部分的系统资源,那么,这会给系统其他的部分造成很大的影响(a run-away impact?).
Why develop an OS?
为什么要开发一个操作系统呢?
There are a number of reasons why people choose to develop an operating system. Although each individual developer may have their own, there are a number of reasons that are common between some (if not most) developers:
人们选择开发操作系统,有很多原因。尽管每个开发者都有自己的原因,不过,在这些原因中,还是有一些共性的:
* Having complete control over the machine. When developing an application or other userspace program, the developer has to take into consideration the code written by others: the operating system, the libraries, other programs, etc. It is a powerful feeling for the only code to be running on a machine to be your own.
*可以完全控制机器。当开发一个应用程序或者是其他的处于用户空间的程序时,开发者必须考虑其他人写的代码----操作系统,库函数,还有其他程序,等等。机器上运行的唯一运行的代码就是你自己写的,这是一种很激动人心的感觉。
* Research. Quite a few operating system projects are started as homework or research projects. While starting an operating system as a homework assignment in a pre-tertiary or first-year environment is generally considered a bad idea (due to short deadlines), a longer term project is quite fine. Research projects are usually undertaken to improve on the existing operating systems. A common beginner mistake, however, is to underestimate the time needed to write an operating system from scratch.*科研。有一部分操作系统开发是以作业或者是科研项目而开始的。当把操作系统开发当作一项是一年内或者是更多的时间来完成的作业任务来进行的时候,这是非常糟糕的一个想法(因为开发的周期太短了)。而科研项目,则通常只是改善现有操作系统的性能。刚开始开发的人,通常会犯这样一个错误-------会低估从无到有开发一个操作系统需要的时间长度。
* To replace the currently available operating systems. Maybe they don't have a particular feature that the developer wants. Maybe they just generally suck (Linux is bloated, Windows is unstable, etc). This may be for profit; although any returns are likely to be a long time away.
*代替现有的操作系统。可能开发者手头上拥有的操作系统并没有具备他们想要的某一个特性。可能开发者仅仅是吃不消(Linux太臃肿庞大了,而Windows不稳定,等等。)。或者是为了商业上的利益而进行开发;虽然,要在开发操作系统上取得一点成功是要花费很多时间的。
* Because it's fun. Low level programming is a fun and exciting task, because you have to do everything. This may seem more difficult (it is, don't worry) but by the same reasons more fun. You know how everything works, how it all fits, and the inner-most workings of your program.
*因为开发操作系统很有意思。进行底层开发是一件有趣而兴奋的事情,因为,你必须做很多事情。而这也意味着,(你的开发)会比较困难(的确就是这样,不过不用惧怕),不过正因为这样,也意味着----这个开发更有趣。你知道计算机系统的所有东西是怎么工作的,它们是如何组合起来的,还有就是你程序的内部工作原理。
Unfortunately, many operating system projects are undertaken for the wrong reasons. See Beginner Mistakes for a list.
不过,很不幸的是,很多操作系统开发项目是基于错误的原因而开始开发的。可以看一看,刚开发操作系统的开发人员所犯的错误(http://wiki.osdev.org/Beginner_Mistakes)
Albert:好了,接下来,再发一篇,刚开始开发操作系统的开发人员所犯的错误列表。