摘要
在计算机世界里,研究操作系统的人越来越小众化的。因为我们现在使用的操作系统,是如此的绚丽多彩,用户的体验又是如此的完美。“所见即所得”的设计使不是计算机专业的人也能很容易的使用计算机。操作系统种类也繁多,有苹果公司的OS x 操作系统,微软的windows操作系统,还有针对银行的稳定需求的UNIX操作系统,甚至也有开源的Linux操作系统。有这么多的操作系统,自己一个人或几个人去开发一个新的系统似乎没有必要。
其次现在的操作系统功能齐全,作用强大。从而也导致了其背后的源代码量也是迅速的暴增。比如Linux kernel 2.6.2.7系统的源代码将近1000万行。如此庞大的源代码也让初学者用户望而却步。
在模拟开发个人简单操作系统的过程中,系统主要参考了赵炯编写的《linux内核完全剖析—基于linux0.12》和《30自制操作系统》。选择这两本书的主要原因是赵炯的书,内容条理清晰,基本功能描述完整;更为主要的是linux0.12的源代码不超过2万行,这样使阅读源代码成为可行,但是由于linux0.12的版本过早,参考了最新出版的《30自制操作系统》。
由于操作系统功能模块清晰,也只是做验证性的实践。故在操作系统开发时,主要思考如何才能更加快的开发程序,软件工程学是否能够应用于此等问题。在系统开发过程中,系统主要实现进程管理和多任务处理;创建系统库;能够与外设交互,例如鼠标、键盘和显示器;实现了与操作系统交互的命令行。
关键字:操作系统,软件工程学,内核,模拟,验证性
Abstract
In the world of computer , the number of people who like to study operating systems or just implement the OS module is becoming smaller and smaller. Because the operating system we use now are so colorful and the experience of users is so perfect. The design of “WYSIWYG” is so convenient that the people who don't know about computer are also easy to use it. And a wide variety of operating systems made it possible that the consumers get more chances to choose the operating systems they like or need . For Example, they can choose OS X which belongs to Apple or windows which belongs to Microsoft. Even like the bank which need high stability, we can choose the UNIX operating system and if we are keen to open source system,we can choose LINUX operating system. So many operating system we can choose. It is no meaning for us to create a new operating system.
Secondly, the functions of operating system are integral and powerful. Indirectly, it leads to quickly increasing the amount of the sources about the operating system,Such as the LINUX kernel 2.6.2.7 whose lines of the code has been beyond 10 Million. So it is not so easy for junior programmers to learn and read the sources. Gradually, they give up and get to be afraid of the operating system mechanism.
In the procedure of development my own simple operating system, I refer the book named “Linux kernel completely dissect” written by qiong zhao and the book named “30 homemade operating system”. I use zhao's book because the orderliness of content is clear and basic functions is integral. And it is the most important that the code-line of LINUX 0.12 is less than 20 thousand which makes it possible to read the source code. The second book I choose is that the first book is too old to practice in real computer system.
As the function models of the operating system are clear,I just practice it and compare it with what I think. When I mange to develop the operating system,I always ask myself that how I can do it more quickly and how I can combine it with the knowledge about Software Engineering. After the development, I achieve the functions-- Process Management and Multi-task handling; Interacting with peripherals such as mouse,keyboard and monitor;implementing the console that can communicate with operating system kernel.
Key Words: operating system, software engineering, kernel, simulation, confirmatory