Responsive image
博碩士論文 etd-0718107-225207 詳細資訊
Title page for etd-0718107-225207
論文名稱
Title
Linux核心的元件化:方法與工具
Componentization in Linux kernel:approach and tools
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
58
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2007-06-29
繳交日期
Date of Submission
2007-07-18
關鍵字
Keywords
核心模組、Linux、熱抽換、作業系統、軟體元件、元件化
software component, hot-swapping, kernel module, Linux kernel, operating system, componentization
統計
Statistics
本論文已被瀏覽 5768 次,被下載 5
The thesis/dissertation has been browsed 5768 times, has been downloaded 5 times.
中文摘要
本論文以元件式軟體的設計方式來發展Linux核心,目的在元件化Linux核心模組並明確定義出元件之間相依關係,以提高軟體系統的可重組性、可更新性、可延伸性與可檢測性,期改善軟體開發之效率和減少維護時的成本,並且發展一套工具來有效地操作核心模組元件。
在架構設計上,最基本的軟體單元為「元件」,想像Linux核心中任何子系統是由多個元件所組合起來。為了實現核心元件化,我們紀錄Linux核心模組重定位的位置,這些位置意指核心模組呼叫其他模組輸出符號的指令位址欄,並且我們發展的工具能夠找出核心模組元件間資料傳遞,以及清楚地觀察核心模組元件間相依關係。在核心元件化系統下,我們更進一步允許系統在執行的狀態下,引入「熱抽換」(hot-swapping)技術,提供核心模組元件無須移除或是終止的情況下,依需要即時改變元件的行為,使核心模組元件可隨時被檢測、抽換及重組。
我們將元件化系統實作於Linux核心版本2.6.17.1。設計核心元件化之方法在不影響執行效率的原則下,核心模組在載入運作中沒有額外的時間代價,再來我們評估了核心元件化系統核心模組載入的時間、耗費的記憶體代價和熱抽換的時間。由於我們的設計方式可以從評估中得知,核心模組載入的時間與記憶體代價會與核心模組中重定位數量成一定比例的增長,另外,熱抽換指令中被熱抽換之外部符號與目標輸出符號兩者的位置會影響熱抽換的時間。由以上實驗結果可知我們仍然有空間去改善核心模組元件化的實現方式。
Abstract
In this thesis, we studied a component-based software design for componentizing Linux kernel. Our goal is to componentize kernel modules and explicitly define the dependency relation of components in the kernel. Componentization can greatly improve composability, evolvability, extensibility and testability of a software system, and can thus increase the productivity of software development and reduce the cost of maintenance. On top of the componentized kernel, we developed a suite of tools to facilitate the operations on kernel components.
In the component-based design, the basic software unit is a component. We envision any subsystem in kernel as a composition of components. To realize the concept, we explicitly create the output ports by augmenting the symbol table of a kernel module to record the relocation information, i.e., the locations where the module invokes the functions exported by other modules. We developed tools to discover the data passing among components such that the dependency relation among components can be clearly disclosed. With componentization in place, we are able to implement the hot-swapping technique which allows the system structure to be dynamically changed at run time. The technique makes it possible to test, swap or re-compose components when part of the system cannot be terminated or removed.
The proposed system is implemented on Linux kernel 2.6.17.1. While our componentization does not introduce any time overhead when modules are in action, we evaluated our approach in terms of module loading time, memory consumption and hot-swapping time. We found that the module loading time and memory consumption of a componentized module are both proportional to the number of relocations in the module. The hot-swapping time is related to the position of the symbol to be swapped in the symbol table. All these suggest that we still have room to improve the way we realized the componentization in Linux kernel.
目次 Table of Contents
第1章 導 論 1
1.1 概論 1
1.2 章節介紹 2
第2章 研究背景 3
2.1 研究動機 3
2.2 以元件基礎的軟體發展 5
2.3 相關研究 7
2.4 Linux核心元件化之挑戰 10
第3章 設計與實作 12
3.1 設計原則 12
3.1.1 維持系統的相容性 13
3.1.2 改變模組系統的原始碼 13
3.1.3 修正模組存取全域變數的方式 13
3.1.4 無需新的系統呼叫 13
3.1.5 執行模組沒有額外的代價 14
3.2 可載入核心模組( Linux Loadable Kernel Module ) 14
3.3 Executable and Linking Format ( ELF ) 15
3.4 核心元件化之設計方法 18
3.4.1 核心模組載入過程 18
3.4.1.1 重定位處理方式 19
3.4.1.2 核心模組使用外部符號的程序 21
3.4.2 儲存外部符號被重定位到的位置 22
3.4.3 熱抽換的方法 24
3.5 核心元件化之工具設計 27
3.5.1 /proc檔案系統 27
3.5.2 核心符號與模組串列的輸出 28
3.5.3 核心元件化工具架構 28
第4章 結果與評估 31
4.1 環境設定 31
4.2 元件連結關係圖 31
4.3 實驗範例 32
4.3.1 檢測 (Profiling) 33
4.3.2 錯誤恢復或更新 34
4.4 效能評估 36
4.4.1 原本系統下核心模組載入時間 37
4.4.2 核心元件化系統下核心模組載入時間與記憶體代價 37
4.4.3 熱抽換時間 39
第5章 結論與未來工作方向 41
5.1 結論 41
5.2 未來工作方向 41
參考文獻 43
參考文獻 References
[1] Bryan Henderson, “Linux Loadable Kernel Module HOWTO”, Mar 2006. http://tldp.org/HOWTO/Module-HOWTO/.
[2] Hung-Ying Tyan, “Design, Realization and Evaluation of a Component-based Compositional Software Architecture for Network Simulation”, PhD thesis, Department of Electrical Engineering, The Ohio State University, 2002.
[3] D. Garlan, R. Allen, and J. Ockerbloom, “Exploiting Style in Architectural Design Environments“, In Proceedings of ACM SIGSOFT Symposium on the Foundations of Software Engineering, December 1994.
[4] D. C. Luckham, J. J. Kenney, L. M. Augustin, J. Vera, D. Bryan, and W. Mann, “Specification and Analysis of System Architecture Using Rapide”, IEEE Transactions on Software Engineering, vol.21, no.4, pp.336-355, April 1995.
[5] J. Magee, N. Dulay, S. Eisenbach, and J. Kramer, “Specifying Distributed Software Architectures”, in Proceedings of the 5th European Software Engineering Conference, ESEC’95, September 1995.
[6] J. Magee, N. Dulay, and J. Kramer, “Structuring Parallel and Distributed Programs”, IEE Software Engineering Journal, vol.8, no.2, pp.73-82, March 1993.
[7] R. B. Allen, “A Formal Approach to Software Architectures”, PhD thesis, Carnegie Mellon University, May 1997.
[8] D. Batory and S. O’Malley, “The Design and Implementation of Hierarchical Software Systems with Reusable Components”, ACM Transactions on Software Engineering and Methodology, vol.1, no.4, pp.355-398, October 1992.
[9] OMG. CORBA. http://www.corba.org, 2000.
[10] Microsoft, Inc. “.NET: Driving Business Value with the Microsoft Platform”, http://www.microsoft.com/net/, 2005.
[11] Microsoft, Inc. “COM: Delivering on the Promises of Component Technology”, http://www.microsoft.com/com/, 2001.
[12] Sun Microsystems, Inc. Java remote method invocation (RMI).
[13] J. Appavoo, K. Hui, C. A. N. Soules, R. W. Wisniewski, D. M. Da Silva, O. Krieger, M. A. Auslander, D. J. Edelsohn, B. Gamsa, G. R. Ganger, P. McKenney, M. Ostrowski, B. Rosenburg, M. Stumm, and J. Xenidis, “Enabling autonomic behavior in systems software with hot swapping”, IBM Systems Journal, vol.42, no.1, pp.60-76, January 2003.
[14] A. Baumann, J. Kerr, J. Appavoo, D. Da Silva, O. Krieger, and R. W. Wisniewski, “Module Hot-Swapping for Dynamic Update and Reconfiguration in K42”, in 6th Linux.Conf.Au, Canberra, Australia, April 2005.
[15] K. Hui, J. Appavoo, R. Wisniewski, M. Auslander, D. Edelsohn, B. Gamsa, O. Krieger, B. Rosenburg, and M. Stumm, “Supporting Hot-Swappable Components for System Software”, Position paper in Operating Systems (HotOS-VIII), May 2001.
[16] Yueh-Feng Lee and Ruei-Chuan Chang, “Hotswapping Linux kernel modules”, The Journal of Systems and Software, vol.79, Issue 2, pp.163-175, February 2006.
[17] E. Kohler, R. Morris, B. Chen, J. Jannotti, and M. F. Kaashoek, “The Click Modular Router”, ACM Transactions on Computer Systems, vol.18, no.3, pp.263-297, August 2000.
[18] The Click Modular Router Project. http://read.cs.ucla.edu/click/.
[19] J. N. Herder, H. Bos, B. Gras, P. Homburg, and A. S. Tanenbaum, “Modular System Programming in MINIX 3”, USENIX; login:, vol.31, no.2, pp.19-28, April 2006.
[20] The MINIX 3 Operating System. http://www.minix3.org/.
[21] Tool Interface Standard (TIS) Executable and Linking Format (ELF) Specification, Version 1.2, TIS Committee, http://www.x86.org/ftp/manuals/tools/elf.pdf. May 1995.
電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:校內一年後公開,校外永不公開 campus withheld
開放時間 Available:
校內 Campus: 已公開 available
校外 Off-campus:永不公開 not available

您的 IP(校外) 位址是 18.191.135.224
論文開放下載的時間是 校外不公開

Your IP address is 18.191.135.224
This thesis will be available to you on Indicate off-campus access is not available.

紙本論文 Printed copies
紙本論文的公開資訊在102學年度以後相對較為完整。如果需要查詢101學年度以前的紙本論文公開資訊,請聯繫圖資處紙本論文服務櫃台。如有不便之處敬請見諒。
開放時間 available 已公開 available

QR Code