WINDOWS运行过程数据采集方法研究
详细信息    本馆镜像全文|  推荐本文 |  |   获取CNKI官网全文
摘要
作为计算机领域最重要的软件之一,操作系统提供了沟通用户与计算机硬件的平台,为广大使用者提供了便利。为了更好的发挥操作系统的功能,对其工作机制和原理的研究越来越受到重视,成为了计算机领域的必修课程。大多数教学和科研领域都以开源的linux系统或实验性操作系统为平台,但日常广泛使用的Windows操作系统却因其商业保密性,使人无法对其深入研究。微软面向高校和科研机构推出的研究型内核WRK (Windows research kernel)为操作系统的研究提供了最好的素材,使科研更贴近实用,更具有说服力。然而,现在的系统内核规模庞大,功能复杂,已不是一己之力就能研究透彻的。尤其是对于初学者,想深入了解其内部机理更是望而生畏。随着可视化技术的不断发展,它在提高人类认知能力方面发挥着越来越明显的优势。将可视化技术引入操作系统教研领域,无疑是有助于学生和科研工作者对操作系统有更深入了解。
     如今,可视化技术与操作系统教研相结合的范例已有不少,但存在一些不足之处。大多数研究平台都是linux或实验性系统mix,与现实广泛使用的windows系统相去甚远。一些以演示内核某些算法为主的可视化软件,重在展现算法,与真实的操作系统相脱节,且数据来源无据可依。有些以真实操作系统为平台的研究工作,多以API编程方式获取内核信息,信息提取不够全面,破坏了操作系统的整体性。为了帮助大多数人更好的了解内核工作机制,本文以真实WRK内核为平台,深入源代码进行修改,重编译内核,提取出规定时间段的所有内核运行信息,并采用可视化技术进行可视化处理。
     本文提出的操作系统教学方法,重在数据来源真实,具有说服力,同时保持了系统的完整性,又不失交互性。重点研究内容包括:
     1、研究对象为Windows内核,深入研读内核源码,提取出内核运行过程中的动态信息。数据采集模块需要定义完备的内核信息描述指令格式,以此指令格式作为理解内核工作原理的标准,并以此格式来修改内核源码,执行重编译的内核提取内核运行信息。
     2、基于内核结构的复杂和代码量的庞大,对于采集的初始数据需进行必要的预处理,一方面便于人工分析初始数据的完整性和可靠性,另一方面可将其作为内核分析的原始材料。
     3、为更加直观的再现操作系统的整体运行过程,采用现代可视化技术,可视化内核运行数据,以图像的方式展示内核运行过程。
     通过本文对新教学方法的探索可知,从内核源码出发,以真实的内核运行过程数据为基础的可视化,可以实现对内核数据结构,算法和综合结构的更深层次的理解,真实性强,整体性强,具有进一步研究和开发的意义。
As one of the most important subjects in computer field, operating system supports a convenient platform which connects users and computer hardware. In order to make operating system work well, more and more attention is focused on the research of its principle, which is required subject in college. Linux and other experimental operating systems are always used in research and education field, and Windows is widely used in normal life. Therefore, it is contrary between learning and use. The research kernel WRK(windows research kernel) affords better research material for colleges and research labs, and connects research and use persuasively. However, the kernel is very complicated and can't be mastered by one person. Especially for beginners, it is a hard work to understand its theory. But in recent years visualization technology develops fast and shows more obvious advantages in improving the human cognitive abilities. Combining visualization technology and operating system education will contribute to the comprehension of operating system theory for students and researchers undoubtedly.
     Presently, a lot of work has done to introduce visualization into operating system teaching field, but there're some deficiencies. Most educational platforms are Linux or experimental operating system, such as Mix. It is different from daily use-windows. Some algorithm visualization tools or software have excellent visual effect but pay more attention to demonstrate algorithm itself, they're separated from actual running system, and so the data source is unreal. A lot of work done using real operating system as platform, collects kernel information by API, but they can not collect global information for operating system is an entireness. In order to help majority to understand operating system well, this paper uses real WRK as research platform, modifies kernel source code, recompiles it and collects executing information of defined period which is used as source data for visualization.
     The method presented in this paper focuses on the reality and persuasion of source data. At the same time, it keeps the whole operating system as an entireness. The research emphasis include:
     1. For the research object is Windows Kernel, comprehension of the kernel is necessary to the data collection of running Kernel. The data collecting model uses the complete instructions which are defined to describe kernel actions, to modify kernel source code and collect executing information.
     2. Because the complexity and enormousness of Kernel source code, a pretreatment of collected data is needed to analyze the integrality and reliability of it, and the collect data can be used as raw material for kernel analysis.
     3. In order to show the operating process of Windows kernel clearly, modern visualization is made to present the kernel executing process.
     Finally, from the exploration of new educational method, we can conclude that the visualization with kernel source code and real kernel executing data as basis, can help to understand the kernel data structure, algorithm and entire structure deeply and the visualization result is more real and acceptable, so it must have the significance for further research and development.
引文
[1]Daniel P.Bovet, Marco Cesati,深入理解Linux内核,第二版,陈莉君等,北京:中国电力出版社,2004:51~70,223~225,269~304
    [2]S.Maxwell, Linux内核源代码分析,冯锐等,北京:机械工业出版社,2000
    [3]赵炯,Linux内核完全注释,北京:机械工业出版社,2004
    [4]毛德操,胡希明,Linux内核源代码情景分析,杭州:浙江大学出版社,2001:29~53
    [5]汤子赢等,计算机操作系统,西安:西安电子科技大学出版社,1996
    [6]OSCAL:http://gaia ecs.csus.edu/-zhangd/OScal/OScal.htm
    [7]O Balci, WS Gilley, RJ Adams, E Tunar, ND Barnette, Animations to Assist Learning Some Key Computer Science Topics, ACM Journal on Educational Resources in Computing,2001,1(2)
    [8]http://courses cs.vt.edu/-csonline/
    [9]Kevin K, Leung, Du Zhang, Animation of Linux Processor Scheduling Algorithm, Multimedia, Seventh IEEE International SympOSium on,2005
    [10]Linux Trace Toolkit Open-source Project,2006 http://www.opersys.com/LTT/
    [11]M Dagenais, R Moore, R Wisniewski, K Yaghmour, T Zanussi, Efficient and Accurate Tracing of Events in Linux Clusters, Proceedings of the Conference on High Performance Computing,2003
    [12]Karim Yaghmour, Michel R.Dagenais, Measuring and characterizing system behavior using kernel-level event logging, In Proceedings of the USENIX Annual 2000 Technical Conference, San Diego, California, USA,2000:13-26
    [13]陈丽波,吴庆波,Linux内核跟踪机制LTT的研究,计算机工程,2005,31(12):61~63
    [14]唐泽圣,孙延奎,邓俊辉,科学计算可视化理论与应用研究进展,清华大学学报(自然科学版),2001,Vol 41,No.4/5
    [15]G.Robertson, S.K.Card, J.D.Mackinlay, The Cognitive Coprocessor Architecture for Interactive User Interfaces, Proceedings of the 2nd annual ACM SIGGRAPH sympOSium on User interface software and technology, New York: ACM Press,1989:10-18
    [16]Daniel A, Keim, Information Visualization and Visual Data Mining, Visualization and Computer Graphics,2002,8(1):1-8
    [17]Steven PReiss, Visualizing Program Execution Using User Abstractions, Proceedings of the 2006 ACM sympOSium on Software visualization, New York:ACM Press,2006:125-134
    [18]B.A.Price, R.M.Baecker, I.S.Small, A Principled Taxonomy of Software Visualization, Journal of Visual Languages and Computing,1993,4(3): 211-266
    [19]C.-C Roman, K.C.Cox, Program Visualization:The Art of Mapping Programs to Picutres, Software Engineering,1992, International Conference on, 1992:412-420
    [20]刘孟仁,刘海庆,软件可视化技术及其应用研究,计算机应用研究,2002,(6):26-28
    [21]Brad A. Myers, Taxonomies of visual programming and program visualization, Journal of Visual Languages and Computing,1990,1(1):97-123
    [22]John T.Stasko, Charles Patterson, Understanding and Characterizing Software Visualization Systems, Proceedings of the 1992 IEEE International Workshop on Vi sual Languages,1992:3-10
    [23]B.A.Price, I. S.Small, R.M.Baecker, A Taxonomy of Software Visualization,In Proceeding of The 25th Hawaii International Conference on System Sciences Ⅱ, New York:IEEE Computer Society Press,1992:597-606
    [24]D. Hendrix, J.H. Cross II, S. Maghsoodloo, The Effectiveness of control strcuture diagrams in source code comprehension activities, IEEE Transactions on Software Engineering,2002,28(6):624-626
    [25]Ball, T. and Eick, S.G, Software visualization in the large, IEEE computer, 1996,29(4):33-43
    [26]P. Saraiya, C.A. Shaffer, D.S. McCrickard, C. North, Effective Features of Algorithm Visualizations, In Proceedings of the 35th SIGCSE Technical SympOSium on Computer Science Education,2004, Norfolk, Virginia, USA: SIGCSE'04:382-386
    [27]S.Hansen, N.H. Narayanan, M. Hegarty, Designing Educationally Effective Algorithm Visualizations, Journal Of Visual Languages And Computing, 2002,13 (3):291-317
    [28]http://www.cc.gatech.edu/gvu/softviz/algoanim/
    [29]Hartley, S.J, Experience with the Language SR in an Undergraduate Operating Systems Course, ACM SIGCSE Bulletin,1992,24(1),176-180
    [30]Lebow, D, A Constructivist Framework for Operating Systems, Educational technology research and development,1993,41(3):4-16
    [31]Chernich, R. and Jones, D, The design and construction of a simulated operating system, Proceedings of Asia Pacific Information Technology In Teaching and Education,1994,94:1033-1038
    [32]Joseph Bergin, A Pattern Language for Initial Course Design, ACM SIGCSE Bulletin, Proceedings of the 32nd SIGCSE Technical Symposium on Computer science education, February 2001,33(1):282-286
    [33]Thomas Wagner, Eugene Ressler, A Practical Approach to Reinforcing Concepts in Introductory Operating Systems, ACM SIGCSE Bulletin, Proceedings of the 28th SIGCSE Technical Symposium on Computer science education, March 1997,29(1),44-47
    [34]Allen Downey, Teaching Experimental Design in an Operating Systems Class, ACM SIGCSE,1999:316-320
    [35]Maia, L.P., Machado, F.B., and Pacheco, A, "A constructivist framework for operating systems education:a pedagogic proposal using the SOsim",10th Annual Conference on Innovation and Technology in Computer Science Education (ITCSE), Universidade Nova de Lisboa, Portugal, June 27-29,2005
    [36]Jones, D., and Newman, A, RCOS.java:a simulated operating system with animations, Proceedings of the computer-Based,2001
    [37]Ron Chernich, Bruce Jamieson, and David Jones, "RCOS:Yet another teaching operating system", In Proceedings of the 1st Australian Conference on Computer Science Education,1996
    [38]Jones, D., and Newman, A, "Constructivist-based tool for operating systems education", Proceedings of EdMedia 2002, Denver, Colorado, June,2002
    [39]Kifer M., and Smolka, S, OSP:An Environment for Operating Systems (Instructor Version), Addison-Wesley,1991
    [40]Anderson, T. E., Christopher, W.A., and Procter, S. J, "The Nachos instructional operating system", Available in http://www.cs.washington.edu /homes/tom/nachos/,1999
    [41]Tanenbaum, A. S. and Woodhull, A. S, Operating Systems:Design and Implementation,2 ed, Prentice-Hall,1997
    [42]Comer, D, Operating System Design-The XINU Approach, Prentice-Hall, 1984
    [43]Naps, T. L. et, Al, Exploring the role of visualization and engagement in computer science education, ACM SIGCSE Bulletin,35 (2),131-152,2003
    [44]Teaching Operating Systems Using Visualization
    [45]Grissom, S., McNally, M. F. and Naps, T, Algorithm visualization in CS education:comparing levels of student engagement, Proceedings of ACM 2003 Symposium on Software Visualization,1(1),87-93,2003
    [46]陈向群,史美林,向勇,尤晋元,Windows操作系统原理,机械工业出版社,2001
    [47]RUSSINOVICH, ME and SOLOMON, DA,深入解析Windows操作系统:Microsoft Windows Server 2003, Windows XP, and Windows 2000技术内幕,北京:电子工业出版社,2007
    [48]张银奎,Software Debugging,电子工业出版社,2008