簡易檢索 / 詳目顯示

研究生: 楊豐銘
Yang, Fang-ming
論文名稱: 嵌入式微核心作業系統虛擬記憶體之實作
The Implementation of Virtual Memory in Embedded Micro-Kernel Operating System
指導教授: 陳 敬
Chen, Jing
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電腦與通信工程研究所
Institute of Computer & Communication Engineering
論文出版年: 2008
畢業學年度: 96
語文別: 中文
論文頁數: 82
中文關鍵詞: 虛擬記憶體作業系統
外文關鍵詞: Virtual Memory, OS
相關次數: 點閱:37下載:5
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 虛擬記憶體是現代作業系統中普遍使用之記憶體管理技術,使電腦系統不僅可以運行記憶體需求規模超過實體記憶體配置之軟體、提升記憶體使用效率與提供系統更高的安全性。
    本論文研究並實作一個基於微核心系統架構下的虛擬記憶體管理機制來管理實體記憶體空間。傳統的嵌入式作業系統因其特定應用之特徵與效能考量,一般不支援虛擬記憶體的功能,本論文以微核心嵌入式系統為研究對象,實作的目的在於提供微核心作業系統有效率與可靠的虛擬記憶體管理機制。本論文實作的重點包括:在Zinix微核心作業系統上實作了分頁管理機制、配合處理器記憶體管理單元的支援提供了分頁保護的機制以提供分頁存取時的安全性,另外並考量系統效能之因素實作了置換(Swap)機制的支援。
    隨著嵌入式系統的應用範圍越來越廣泛,虛擬記憶體管理功能的支援逐漸成為值得考慮的系統功能。本論文之實作提供一個有效率且安全的虛擬記憶體管理系統,配置於微核心架構之嵌入式作業系統,開發人員可以依照其不同的系統需求,選擇是否配置虛擬記憶體管理機制,提供系統開發者另外一個解決方案。

    Virtual memory is a memory management technology commonly used in modern operating systems, which not only allows computer system to run software using memory more than physically configured, but also provides more efficiency in memory utilization and high security among process running in the system.
    This thesis presents a study and implementation of virtual memory management in an embedded micro-kernel operating system. Tranditionally, embedded operating systems in general do not support virtual memory due to the application sepcific characteristics and concerns in performance. The goal of this thesis therefore is to provide an efficient and reliable virtual memory management mechanism. The important parts of this implementation include a page management allocator in Zinix micro-kernel operating system, a page access permission protection mechanism with memory management unit(MMU) support and process swap mechanism that takes performance issues into consideration.
    With the wide spreading of embedded system applications, it is worthy considering supporting virtual memory management technique in embedded operating systems. This implementation provides an efficient and safe virtual memory management system and gives another choice for developers. Developers can choose whether or not to use the virtual memory management functionality by configurating the system environment setting according to their particular requirements or needs.

    第1章 簡 介 1 1.1 微核心作業系統 1 1.2 虛擬記憶體 3 1.3 研究動機 4 1.3.1 虛擬記憶體 4 1.3.2 微核心架構 5 1.4 章節規劃 5 第2章 相關研究 7 2.1 嵌入式作業系統的記憶體管理 7 2.2 無記憶體管理單元之記憶體管理 8 2.2.1 μClinux 9 2.2.2 μC/OS-II 10 2.2.3 討論 11 2.3 使用記憶體管理單元之記憶體管理 12 2.3.1 Symbian OS 13 2.3.2 Windows Mobile 15 2.3.2.1 Windows Mobile 5.0 15 2.3.2.2 Windows Mobile 6.0 17 2.3.3 Linux 20 2.4 比較與討論 21 第3章 系統平台 24 3.1 硬體平台 24 3.2 ARMV5記憶體管理單元(MMU)簡介 25 3.2.1 記憶體管理單元的記憶體映射機制 25 3.2.2 存取控制機制 29 3.2.3 分頁異常處理 31 3.3 ZINIX微核心作業系統 34 3.4 ZINIX記憶體管理伺服行程(MM SERVER) 36 3.5 軟體開發平台 37 第4章 虛擬記憶體管理機制設計與實作 39 4.1 虛擬記憶體架構設計 39 4.2 行程的虛擬記憶體位置分配 41 4.2.1 核心行程虛擬記憶體空間 42 4.2.2 使用者行程虛擬記憶體 44 4.2.3 伺服行程虛擬記憶體運行空間 45 4.3 分頁存取權限管理機制 46 4.4 記憶體異常的處理 47 4.5 虛擬記憶體管理模組實作 49 4.5.1 處理器記憶體管理單元初始化 50 4.5.2 實體分頁管理 52 4.5.3 實體分頁申請 55 4.5.4 實體分頁回收 56 4.5.5 記憶體區域描述結構 56 4.6 記憶體管理模組(MEMORY MANAGER SERVER)相關實作 58 4.7 記憶體管理函式庫 59 4.8 記憶體回收機制 60 4.8.1 記憶體回收機制的考量 60 4.8.2 記憶體區段回收 61 4.8.3 記憶體區段回復 63 第5章 系統效能分析 64 5.1 實作相關模組大小統計 64 5.2 測試環境設定 65 5.2.1 硬體環境設定 65 5.2.2 計時器硬體簡介 65 5.3 系統效能分析 66 5.3.1 開啟硬體記憶體管理單元對效能的影響 67 5.3.2 需求與回收一個頁塊所需的時間 70 5.3.3 實作前後新增一個行程所需時間的落差 71 5.3.4 上下文交換(Context Switch)的執行時間 73 5.3.5 頁塊回收機制 74 5.3.6 頁塊回復機制 75 第6章 結論與未來工作 77 6.1 結論 77 6.2 未來工作 77 參考文獻 79 附錄 精確時間測量程式 82

    1. Abraham Silberschatz, Peter Bear Galvin, and Greg Grane, ”Operating system
    Concepts”, 6th edition, John Wiley & Sons, Inc., 2001, ISBN:0-471-25060-0.
    2. Andrew S. Tanenbum, Albert S. Woodhull, “Operating Systems – Design and
    Implementation”, 3rd edition, Prentice Hall, 2006, ISBN: 0-13-142938-8.
    3. Appro Photoelectron Inc., “DM320 EVM BOARD TMX320DM320ZHK TEST
    MODULE INSTALLATION GUIDE Ver1.0 2004/5/3”.
    4. ARM Inc., “ARM Architecture Reference Manual”, ARM Doc. NO.: DDI-0100E.
    5. Benjamin Roch, TU Wien, “Monolithic kernel vs. Microkernel”, 2004.
    6. David McCullough, “uClinux for Linux Programmers”, Linux Journal, Issue 123,
    July 2004.
    7. “Different Kernel Designs Overview”, http://systhread.net/texts/200510kdiff.php.
    8. “Demand page on Symbian OS”,
    http://www/symbian.com/symbianos/demandpaging/index.html.
    9. Douglas Boling, “Programming Microsoft Windows CE .Net”, 3rd edition, O’Reilly,
    2004, ISBN: 0-7356-1443-1.
    10. Jean J. Labrosse, “MicroC/OS II: The Real Time Kernel”, CMP Books, 2002, ISBN:
    1-57820-103-9.
    11. Jeff Bonwick, “The Slab Allocator: An Object-Caching Kernel Memory Allocator”,
    USENIX Summer, 1994.
    12. Mel Gorman, ”Understanding The Linux Virtual Memory manager”, Prentice Hall,
    2004, ISBN:0-13-145348-3.
    80
    13. MSDN, “Paging Pool: Windows CE 5.0 vs. Windows Embedded CE 6.0”,
    http://msdn2.microsoft.com/en-us/library/aa909043.aspx.
    14. MSDN, “What's New for Developers in Windows Mobile”,
    http://msdn2.microsoft.com/en-us/library/bb278115.aspx.
    15. Robert Love, ”Linux Kernel Development”, 2nd edition, Novell, 2005, ISBN:
    978-0-672-32512-0.
    16. Texas Instruments, “TMS320DM320 CPU and Peripherals Technical Reference
    Manual Version 1.1”.
    17. “Technical Whitepaper: Memory Management Under uClinux”,
    http://lwn.net/Articles/984/.
    18. “The ARM Architecture Version 6”,
    http://www.arm.com/pdfs/ARMv6_Architecture.pdf.
    19. “The Memory Management Reference Beginner's Guide”,
    http://Allocation11www.memorymanagement.org/articles/alloc.html.
    20. Samsung Electronics Co. Ltd., “lmbench lat_ctx results of linux 2.6.11.6 noMMU
    mode vs. MMU mode vs. Montavista Linux 2.4.20-mvista”,
    http://opensrc.sec.samsung.com/document.html.
    21. “Symbian”, http://en.wikipedia.org/wiki/Symbian.
    22. Wikipedia, “Linux”, http://en.wikipedia.org/wiki/Linux.
    23. Wikipedia, “Memory Management Unit”,
    http://en.wikipedia.org/wiki/Memory_management_unit.html.
    24. Wikipedia, “Virtual memory map in Symbian OS”,
    http://wiki.forum.nokia.com/index.php/Virtual_Memory_Map_in_Symbian_OS.
    25. Wikipedia, “VxWorks”, http://en.wikipedia.org/wiki/VxWorks.
    26. Wikipedai, “Windows mobile”, http://en.wikipedia.org/wiki/Windows_Mobile.
    81
    27. 洪文彬, “嵌入式微核心系統之設計與實作”, 碩士論文, 國立成功大學, 2005.
    28. 莊俊傑, ”異質性處理器核心嵌入式系統之動態程式碼疊置機制之設計與實作”,
    碩士論文, 國立成功大學, 2006.

    下載圖示 校內:2010-02-18公開
    校外:2010-02-18公開
    QR CODE