簡易檢索 / 詳目顯示

研究生: 許雅雯
Hsu, Ya-Wen
論文名稱: 元件化嵌入式作業系統之研究
A Study of Component-based Operating System for Embedded System
指導教授: 陳敬
Chen, Jing
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 電腦與通信工程研究所
Institute of Computer & Communication Engineering
論文出版年: 2020
畢業學年度: 108
語文別: 中文
論文頁數: 114
中文關鍵詞: 元件式元件式作業系統抽換核心服務
外文關鍵詞: Component-based, Component-based Operating System, Swapping kernel servive, Embedded System
相關次數: 點閱:148下載:16
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本論文描述元件化嵌入式作業系統之研究,研究方向為:(1)將核心功能簡化,因應功能簡單且重複之任務,如需其他功能的支援,以元件的方式作為擴充;(2)使用者不必全面了解系統內部構造,只需透過元件之間的介面做溝通;(3)更新元件時,能達到系統運行時抽換元件。目的是為了因應小型裝置端嵌入式系統,功能不需太完善但須具備彈性擴充之特點以能配合裝置端應用之變化,並且能在核心運行時更新元件。
    基於本論文之研究,本論文設計一元件式作業系統,稱為Turning OS,作為研究元件化嵌入式作業系統之實例。Turning OS的組成分為六部分:(1)元件,其類型分為檔案系統類型、驅動類型及核心服務類型,且元件操作流程則分為從核心運行時插入、移除及抽換三種不同的操作模式;(2)元件管理者,提供元件的插入、移除及抽換等服務;(3)行程管理者,處理行程或執行緒結束程式時相關的資源回收及重用;(4)檔案系統管理者,處理檔案系統類型元件的操作及檔案的讀寫;(5)核心符號表(Kernel Symbol Table),作為元件插入及使用時的介面(Interface)。實作內容包含Turning OS的六大部分之概念性驗證,以及Turning OS運行時所需用到的fork、thread、 mutex及fread/fwite等檔案操作。(6)應用程式,為使用者與核心要求服務之方法;
    本論文之主要貢獻為:(1)研究現有之元件式作業系統,並且探討元件式作業系統更新元件之議題,並由於目標為功能簡易且重複之裝置端,因此降低元件之顆粒度;(2)研究將元件的更新以抽換的方式替換,並減少元件及應用程式重新重定位(Relocation)及載入(Load)之時間;(3)研究抽換核心服務之可行性也列入本論文的討論及概念性驗證中。本論文研究驗證之結果為Turning OS在核心建立階段,能成功選擇檔案系統類型元件;核心運行階段,能成功抽換硬體驅動元件及排程器元件。

    The technique of the component-based operating system might have been very mature. However, currently component-based operating systems cannot manage, during system runtime, components that are built without the full source code of the operating system. In order to satisfy the need of updating components at runtime, this is one part that needs improvement. Components thus can be developed without understanding the internal structures of the operating system and the implementation of components only need to comply with the interfaces defined between the components and the operating system. If the kernel services of an operating system can be componentized as many as possible, the size of the kernel can be minimized to meet the requirements of running simple and repetitive tasks while using components as a way to achiving extensions of system functionalities.
    This study looks into the management of components in component-based operating systems and, for the purposes of demonstration, develops a simple component-based operating system, namely Turning OS, as a platform for proof of concept. There are three main parts in this study: (a) The structure of components and the management of their operations, including the interface design, the operations of desired management functions such as insertion, removal, and replacement, as well as the management of component dependencies. (b) The architecture design of Turning OS which is focused on the basic kernel functions required for supporting a component-based operating system. (c) The implementation of Turning OS including the kernel, needed shell commands as user interface, components for test purpose and applications for demonstration purpose. The correctness of component management operations in Turning OS can be shown by carrying out testing operations through issuing shell commands during system runtime and checking that running applications are not affected.
    The development of Turning OS is based on micro-kernel architecture with the main purpose of verifying the correctness of component operations. There are six parts in the implementation of Turning OS: (a) the kernel which mainly provides the basic and essential system service functions including process management, memory management, and IPC (Inter-Process Communication) mechanisms; (b) component manager which implements functionalities related to component management operations such as insertion, removal, and replacement; (c) file system manager which support operations of file system type components and file access; (d) kernel symbol table which plays the role of a bridging interface between the kernel and components; (e) components which implement specific service functions needed by applications; (f) shell and application programs which help operate and test component operations and execution. The Turning OS is implemented on a Rasberry Pi single board computer.
    The most valuable contributions of this study are as follows. (a) Studies currently existing component-based operating systems and addresses the issue that components in these components-based operating systems can not be updated during system runtime. Furthermore, since the goal is to update components for running simple and repetitive tasks in embedded systems, this study effectively demonstrates that the granularity of a component can be reduced. (b) As Turning OS has simpler kernel compare to Linux, it can update components through swapping operation and greatly decrease the time of restart, reload and relocation components and applications. (c) This study shows that kernel services can be swapped as components through the experiment which takes the scheduler of kernel service as a component. (d) The result of verification shows that Turning OS can operate on files with file systems of different types as components which are selected in system building phase and can also successfully swap components of hardware drivers and components of scheduler service in system running phase.

    中文摘要 i 英文摘要 ii 致謝 xi 目錄 xii 表目錄 xv 圖目錄 xvi 第1章 緒論 1 1.1 研究背景 1 1.2 研究動機 3 1.3 研究方法 3 1.4 章節規劃 4 第2章 相關研究 5 2.1 元件式作業系統(Component-Based Operation System) 5 2.2 Pebble OS 8 2.3 Tiny OS 9 2.4 Helen OS 11 2.5 常見作業系統 12 2.5.1 Linux 12 2.5.2 QNX 13 2.5.3 Minix 14 2.6 系統核心之優劣探討 15 2.7 設計方向 18 第3章 核心架構設計 20 3.1 系統架構 20 3.2 元件設計 22 3.2.1 元件格式 22 3.2.2 元件流程 23 3.2.3 元件類型 26 3.2.4 使用者操作元件之流程 30 3.3 元件管理者 36 3.4 檔案系統管理者 37 3.5 行程管理者 40 3.6 訊息傳遞 40 3.7 排程器 43 3.7.1 多佇列排程之資料結構 43 3.7.2 佇列類型 44 3.8 使用者操作介面 45 3.8.1 殼層(Shell) 45 3.8.2 應用程式(Application) 46 3.8.3 元件(Component) 47 第4章 核心實作 49 4.1 實作平台 49 4.2 實作內容 50 4.2.1 元件實作 50 4.2.2 核心服務實作 52 4.2.3 殼層指令實作 55 4.2.4 系統呼叫實作 55 4.3 啟動程式 58 4.4 元件管理 59 4.4.1 元件管理者 59 4.4.2 元件格式 61 4.4.3 系統內部元件運作 63 4.5 排程器 66 4.5.1 排程器與排程器元件之介面 66 4.5.2 排程器元件 68 4.6 訊息傳遞 70 4.7 檔案系統管理者 72 4.7.1 選擇檔案系統類型之方法 72 4.7.2 檔案資訊 73 4.7.3 目錄結構 74 4.7.4 檔案管理 76 4.7.5 檔案系統類型元件 77 4.8 核心基本之功能 78 4.8.1 記憶體管理 78 4.8.2 系統呼叫 79 4.8.3 文本交換(Context Switch) 80 4.8.4 互斥鎖(Mutex) 82 第5章 系統測試 84 5.1 系統測試環境 84 5.2 元件測試 85 5.2.1 檔案系統類型元件 85 5.2.2 驅動類型元件 97 5.2.3 核心服務類型元件 105 第6章 結論與展望 111 6.1 結論 111 6.2 展望 111 參考文獻 112

    [1] A. S. Tanenbaum and A. S. Woodhull, “Operating systems: design and implementa-tion”, Prentice Hall Inc., 1997, ISBN 0136301959.
    [2] A. Silberschatz, P. Galvin, and G. Gagne, “Operating System Concepts, 6th Edition”, John Wiley & Sons, Inc., 2003, ISBN 0471262722.
    [3] A. Holdings, “ARM Architecture Reference Manual, ARMv8, for ARMv8-A architec-ture profile”, 2019.
    [4] “Asus X550VB” [Online]. Available: https://www.asus.com/tw/Laptops/X550VB/HelpDesk_Download/, acessed on 2020-1-30.
    [5] B. Barney, “POSIX Threads Programming” [Online]. Available: https://computing.llnl.gov/tutorials/pthreads/, acessed on 2020-1-30.
    [6] “Communication Models” [Online]. Available: https://www.tutorialspoint.com/message-passing-vs-shared-memory-process-communication-models, acessed on 2020-1-30.
    [7] D. Griffiths and D. Griffiths, “Head First Android Development: a brain-friendly guide”, O'Reilly Media, Inc.", 2017, ISBN 9781491974049.
    [8] D. Hildebrand, “An Architectural Overview of QNX”, Proceedings of USENIX Workshop on Microkernels and Other Kernel Architectures, pp. 113-126,1992.
    [9] D. Seal, “ARM architecture reference manual”, Pearson Education, 2001.
    [10] E. Gabber, C. Small, J. L. Bruno, J. C. Brustoloni, and A. Silberschatz, “The Pebble Component-Based Operating System”, in USENIX Annual Technical Conference, General Track, 1999, pp. 267-282.
    [11] “Helen OS Documentation” [Online]. Available: http://www.helenos.org/wiki/Documentation, acessed on 2020-1-30.
    [12] “IDC Reach of Internet of Things” [Online]. Available: https://www.idc.com/getdoc.jsp?containerId=prUS44596319, acessed on 2020-1-30.
    [13] “IoT Operating Systems” [Online]. Available: https://www.arrow.com/en/research-and-events/articles/iot-operating-systems, acessed on 2020-1-30.
    [14] J. Corbet, A. Rubini, and G. Kroah-Hartman, “Linux Device Drivers: Where the Ker-nel Meets the Hardware”, O'Reilly Media, Inc.", 2005, ISBN 0596005903
    [15] M. Decký, “Component-based General-purpose Operating System”, 2007.
    [16] M. Kerrisk, “The Linux programming interface: a Linux and UNIX system program-ming handbook”, No Starch Press, 2010.
    [17] M. Welsh, “Implementing loadable kernel modules for Linux”, Dr Dobb's Jour-nal-Software Tools for the Professional Programmer, vol. 20, no. 5, pp. 18-27, 1995.
    [18] P. Levis et al., “TinyOS: An operating system for sensor networks”, in Ambient intelli-gence: Springer, 2005, pp. 115-148.
    [19] “Raspberry-Pi” [Online]. Available: https://www.raspberrypi.org/, acessed on 2020-1-30.
    [20] “Raspberry Pi 2 & 3 Pin Mappings” [Online]. Available: https://docs.microsoft.com/en-us/windows/iot-core/learn-about-hardware/pinmappings/pinmappingsrpi, acessed on 2020-1-30.
    [21] “Raspbrian” [Online]. Available: https://www.raspberrypi.org/downloads/raspbian/s, acessed on 2020-1-30.
    [22] “Read-Write Lock” [Online]. Available: https://blog.csdn.net/qq_31780525/article/details/54376674, acessed on 2020-1-30.
    [23] S. Dickinson, “Eclipse Foundation Survey” [Online]. Available: https://ubuntu.com/blog/ubuntu-ranked-as-2nd-most-used-iot-os-by-eclipse-foundation-survey, acessed on 2020-1-30.
    [24] “S. Matyukevich. Raspberry-pi-os” [Online]. Available: https://github.com/s-matyukevich/raspberry-pi-os, acessed on 2020-1-30.
    [25] “What is android?” [Online]. Available: http://www.helenos.org/wiki/Documentation, acessed on 2020-1-30.
    [26] Z. Baldaszti, “Raspi3-tutorial” [Online]. Available: https://github.com/bztsrc/raspi3-tutorial, acessed on 2020-1-30.

    下載圖示 校內:立即公開
    校外:立即公開
    QR CODE