操作系统核心的设计与实现使用面向对象的方法
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
操作系统软件应该灵活而有效。而且,操作系统应该在不牺牲这两个特点的情况下随着应用的变化而变化。这些变化包括硬件技术的改进以及用户要求的变化。要适应硬件的变化需要可移植性,例如处理器数量的变化。同时,操作系统应该能根据用户的要求进行扩展,例如以前的对图形化的用户界面和分布式系统的支持。
     重要的不仅仅是可移植性和扩展性,他们之间的交互也可能需要折衷。例如,如果现有的机制要与新的机制共存,扩展性可能就会破坏性能。
     面向对象的模式逐渐的变成用来解决操作系统面临的这类问题的一个很好的工具。面向对象的编程可以支持通用接口和代码的共享、可重用和扩展的软件,因为函数可以通过接受不同的参数而实现不同的功能。
     其实,许多现代操作系统中都使用了面向对象的技术。例如,系统中程序的运行时动态链接技术。这种技术中程序的链接不是静态的,而是在运行时根据需要链接相应的模块。这与面向对象技术中的可拆卸技术是一致的。我们可以把程序的各个模块看成对象,需要那个对象,我们就链接那个对象。尽管UNIX和Linux是用C实现的,它们也使用了很多面向对象的思想。
     本论文首先讨论了面向对象方法解决操作系统移植性,扩展性问题的可行性,然后详细描述了如何用面向对象的编程和设计技术来设计一个操作系统核心。作者实现了其中的进程管理部分。对实验系统的性能,移植性和扩展性进行了评估,证明了用面向对象的方式构建,并使用面向对象编程语言编写的操作系统在性能下降不是很大的情况下拥有很好的移植性,扩展性和维护性。
Operating system software should be flexible and efficient. Furthermore, an operating system should survive a lifetime of change without sacrificing either of these properties. These changes include both advances in hardware technology and changing demands from users. Keeping pace with advances in hardware technology makes portability necessary, for example, transplanting an existing operating system from single processor to multiple processors. Also, an operating system should be extensible enough to meet the changing requirements from users. In the past these demands included the support for graphical user interfaces and distributed systems.
    Not only are requirements of portability and extensibility important, but also their interaction can acquire important tradeoffs. For example, extensions may impair performance if existing mechanisms are alerted to coexist with new mechanisms.
    Object-oriented paradigm has become one useful tool to solve this kind of problems. Object-oriented programming can support the sharing of common interface and code, incremental extensibility and the development of reusable and extensible software by allowing functions to take different objects as arguments.
    Nowadays, we witnessed various object-oriented technologies in many modern operating systems, for example, the dynamic linking during the runtime of a process. The modules of a process are not linked before it runs, and it can choose which modules to link when it is running. This technique matches the reconstruction in object-oriented paradigm. And although UNIX and Linux are implemented with C language, they also adopted many object-oriented techniques, especially in the file system and network systems.
    In this paper, we first discussed the problems encountered by modern operating system designers and the advantages of using object-oriented techniques to design and implement operating systems. Then we presented in detail the process of designing an object-oriented operating system. The process management was implemented and the performance of context switching was tested. The system performance, portability and the extensibility were evaluated. It was proved that without obvious sacrifice of system performance, objected-oriented technologies are able to significantly increase the portability, extensibility and maintenance of the operating systems.
引文
[1] Vinny Cahill. Flexibility in Object-Oriented Operating System: An Overview. Technical Report of Department of Computer Science in Trinity College Dublin, 1996
    [2] 汤子赢,哲凤屏,汤小丹.计算机操作系统.西安电子科技大学出版社.1996.12
    [3] 毛德操,胡希明.Linux内核源代码情景分析.浙江大学出版社.2001.9
    [4] Abraham Silberschatz, Peter Baer Galvin, Greg Gagne. Operating System Concepts, 5th edition. John Wiley & Sons, Inc. 1998.1
    [5] Doreen L. Galli, Distributed Operating Systems: Concepts and Practice, Prentice Hall, 2002
    [6] Jean L. McKechnic, editor. Webster's New Twentieth Century Dictionary. Simon & Schuester, 1997
    [7] Mike Accetta et al. Mach: A New Kernel Foundation for UNIX Development. In Proceedings of the USENIX Conference, page 93-111, June 1986
    [8] S.J.Mullender, editor. The Amoeba Distributed Operating System: Selected Papers 1984-1987.CWI Tract 41, Center for Mathematics and Computer Science, 1987
    [9] J.K.Ousterhout, A.R.Cherenson, F. Douglis, M.N.Nelson, and B.B.Welch. The Sprite Network Operating System. IEEE Computer, 21(2):23-25, February 1988
    [10] E. W. Dijkstra, The Structure of the THE Multiprogramming System. http://www.acm.org/classics/mar96/
    [11] Barbara H. Liskov. The Design of the Venus Operating System. Communications of the ACM, 15:144-149, March 1972
    [12] A.N.Habermann, L. Flon, and L. Cooprider. Modularization and Hierarchy in a Family of Operating Systems. Communications of the ACM, page 266-272, May 1976
    [13] S.E.Madnick and J.J.Donovan. Virtual Machine/370(VM/370). In Operating Systems, pages 549-563. McGraw-Hill, New York, 1974
    [14] David R.Cheritono The V Distributed System. Communications of the ACM, Vol. 31, No. 3, pp.314-333, March 1988
    [15] J. J. Dongarra, S. W. Otto, M. Snir, and D. Walker A Message Passing Standard for MPP and Workstations, Communications of the ACM, vol 39, page84-90, July 1996.
    [16] W. Richard Stevens 著,杨继张译,UNIX网络编程 第2卷:进程间通信.清华大学出版社。2000.3
    [17] Eugene Howard Spafford. Kernel Structures for a Distrubuted Operating System. Ph.D. thesis, Georgia Institute of Technology, May 1986
    
    
    [18] Andrew S.Tanenbaum, Robbert van Renesse, Hans van Staveren, Gregory J. Sharp, Sape J. Mullender, Jack Jansen, and Guido van Rossum. Experiences with Amoeba Distributed Operating System. Communications of the ACM, Vol. 33, No. 12, pp.46-63, December 1990
    [19] M.Rozier, V. Abrossimov, F. Armand, I.Boule, M.Gien, M.Guillemont,F.Herrmann.C.Kaiser, S.Langlois, P. Leonard, and W.Neuhauser. Chorus Distributed Operating Systems. Computing Systems, Vol. 1, No. 4, pp.305-370, Fall 1988
    [20] Adele Goldberg. Smalltalk-80: The Interactive Programming Environment. Addison-Wesley Publishing Company, Reading, Massachusetts, 1984
    [21] (美)赫伯特.希尔特,C语言大全(第四版),电子工业出版社 2001.9
    [22] 丁文魁,陈士龙。PASCAL语言程序设计。北京大学出版社。
    [23] 龚天富,侯文永.程序设计语言与编译.电子科技大学出版社.1997.6
    [24] J. O. Graver. Type-Checking and Type-Inference for Object-Oriented Programming Language. PhD thesis Department of Computer Science, University of Illinois at Urbana-Champaign, 1989
    [25] Kim Bruce. Typing in object-oriented languages: Achieving expressiveness and safety. Technical Report, William College, 1996
    [26] 肖基毅.面向对象程序设计中的多态性研究.微计算机应用,1999:20(3)
    [27] 张松梅.C++语言教程.电子科技大学出版社.1993.3
    [28] Maurice J.Bach, The Design of the UNIX Operating System. Prentice Hall, Englewood Cliffs, New Jersey, 1986
    [29] AT&T Customer Information Center, Indianapolis, IN. System V Interface Definition, 1985
    [30] 4.2 Berkeley Software Distribution, University of California, Berkeley, UNIX Programmer's Manual: Reference Guide, March 1984
    [31] Peter W. Madany, an Object-Oriented Approach towards a General Model of File Systems, PhD thesis, Department of Computer Science, University of Illinois at Urbana-Champaign, 1991
    [32] Peter Madany, Douglas Leyens, Vincent Russo, and Roy Campbell. A C++ Class Hierarchy for Building UNIX-Like File Sytems. In Proceedins of the USENIX C++ Conference, October 1988
    [33] Harvey M. Deital. Case Study: VAX. In Introductio to Operating Systems, pages505-533. Addison-Wesley Publishing Company, Reading, Massachusetts, 1984
    [34] Eric Jul, Henry Levy, Norman Hutchinson, and Andrew Black. Fine-Grained Mobility in the Emerald System. In Proceedings of the Eleventh ACM Symposium on Operating System Principles. Pages 62-74, November 1987
    [35] Daniel Swinehart, Polle Zellweger, Richard Bach, and Robert Hagmann. A Structural View of the CEDAR Programming Environment. ACM Transactions on Programming Languages and Systems, 8:419-490, October 1986
    
    
    [36] M. Shapiro, Y. Gourhant, S. Habert, L. Mosseri, M. Ruffin, C. Valot. SOS: an Object-oriented Operating System-Assessment and Perspectives, Computing Systems, 2(4) pp. 287-338, Dec. 1989
    [37] William Stallings.操作系统-内核与设计原理(第四版).电子工业出版社.2001.6
    [38] Andrew Schulman, Wake Up and Smell the Working Set, Dr. Dobb's Journal, December, 1992 (http://www.ercb.com/ddj/1992/ddj.9212.html)
    [39] Andrew S. Tanenbaum, Albert S. Woodhull, Operating Systems: Design & Implementation (Second Edition), Prentice-Hall International, Inc. 1997,9
    [40] G. Myers and B.Buckingham. A Hardware Implementation of Capability-Based Addressing. In ACM Operating Systems Review, pages 13-25, October 1980
    [41] http://www.eventhelix.com/RealtimeMantra/Basics/ComparingCPPAndCPerformance.htm
    [42] Bruce Eckel,C++编程思想.机械工业出版社.2002.1

© 2004-2018 中国地质图书馆版权所有 京ICP备05064691号 京公网安备11010802017129号

地址:北京市海淀区学院路29号 邮编:100083

电话:办公室:(+86 10)66554848;文献借阅、咨询服务、科技查新:66554700