簡易檢索 / 詳目顯示

研究生: 鄭熙和
ZHENG, XI-HE
論文名稱: 基於FreeRTOS設計實作嵌入式分散運算中介軟體
Design and Implementation of Embedded Distributed Computing Middleware Based on FreeRTOS
指導教授: 侯廷偉
Hou, Ting-Wei
學位類別: 碩士
Master
系所名稱: 工學院 - 工程科學系
Department of Engineering Science
論文出版年: 2020
畢業學年度: 108
語文別: 中文
論文頁數: 51
中文關鍵詞: 分散式運算FreeRTOS微控制器嵌入式
外文關鍵詞: Distributed Computing, FreeRTOS, MCU, Embedded
相關次數: 點閱:82下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 本論文以嵌入式系統及FreeRTOS為基礎,設計並實作分散式處理中介軟體,目標是參照MPI的平行程式的風格,達到Single-Program-Multiple-Data的分散式運算。藉由FreeRTOS的功能,管理記憶體以及微控制器能並行處理多個任務,每個節點可以貢獻部分記憶體以及處理時間來運行分散式任務,使用者不只可以指定多組目標數據以及最小分割數,還能在所有子任務完成後決定回收結果時間以及是否使用屏障(Barrier)。若不使用屏障一旦子任務完成則回收結果,使用屏障則需所有子任務完成才可回收結果。本論文藉由實驗,在ARM Cortex-M4的STM32F407開發板上實踐,並以10M bps傳輸,各節點並行地運行本地任務以及分散式任務,在不同節點數量下,定義系統的最小花費時間,以及增加傳輸量整體傳輸速率,並以2D卷積和RSA加密執行分佈式運算為應用實例,也使用OV7670攝像模組拍攝圖像,將BGR565轉化為灰階再以2D卷積處理模糊化模擬實際應用。2D卷積在八個節點數時不使用屏障加速約1.80倍,RSA加密在四個節點數時不使用屏障加速約1.86倍,擷取圖片轉灰階在兩個節點數使用屏障加速1.68倍,擷取圖片轉灰階後進行以2D卷積處理模糊化在八個節點數時不使用屏障加速3.89倍,各實驗在分散式運算下皆能比本地運算達到更好的效率。

    This thesis proposed a distributed computing middleware based on FreeRTOS and an embedded system. The programming style is like MPI’s and a single-program multiple data distributed computing model is proposed. Users program a distributed task according to the middleware interface. The distributed task sends the same instructions and part of data to each node for single-program-multiple-data distributed operation. With FreeRTOS, each node contributes part of its memory and its computing time slice to process the distributed task and executing their own local tasks concurrently. Users can not only specify multiple sets of target data and the minimum number of split size, but also decide when to retrieve result time after all subtasks are completed.
    Three benchmark programs were developed. One is for a 2D convolution computation. Another is for RSA encryption. The other is a real application that uses an OV7670 camera module to capture photos, to transform BGR565 to gray, then to do 2D convolution to blur the photo. According to experimental results, 2D convolution speeds up about 1.80 times with eight nodes. RSA encryption speeds up about 1.86 times with four nodes. BGR565 to gray then 2D convolution operation has speedup about 3.89 times with eight nodes.

    摘要 I Extended Abstract II 誌謝 VI 目錄 VII 表目錄 IX 圖目錄 X 第一章 緒論 1 1.1 研究背景與動機 1 1.2 研究貢獻 2 1.3 論文架構 2 第二章 文獻探討 3 2.1 相關論文 3 2.2 FreeRTOS 5 2.3 Message Passing Interface 7 第三章 嵌入式系統分散式運算 9 3.1 系統架構 10 3.2 運作流程 11 3.3 使用者範例 14 3.3.1 創立分散式任務 14 3.3.2 最小分割數 15 3.3.3 使用者定義分散式任務 16 3.3.4 分散式任務限制 17 3.3.5 回收運算結果 18 3.4 節點連接 19 3.4.1 節點初始化 19 3.4.2 Backup Master Node 20 3.4.3 節點記憶體 21 3.5 分派任務 22 3.5.1 請求釋放權限 23 3.5.2 解碼指令範圍 23 3.5.3 解碼Stack空間 25 3.5.4 切割數據及分派任務 25 3.5.5 合併子任務 27 3.5.6 分派子任務流程 27 3.6 管理任務 29 第四章、實作成果與討論 33 4.1 少量數據不執行運算 34 4.2 固定數據不執行運算 35 4.3 固定數據執行簡易運算 36 4.4 固定數據執行卷積運算 37 4.5 固定數據執行RSA加密 39 4.6 相機BGR565轉灰階 40 4.7 相機BGR565轉灰階後卷積運算 42 4.8 不同節點數比較 43 4.9 實驗討論 44 第五章、結論與未來展望 46 5.1 結論 46 5.2 未來展望 48 參考文獻 49 附錄A -Matrix multiplication分散式任務範例 51

    [1] O. Hahm, E. Baccelli, H. Petersen and N. Tsiftes, "Operating systems for low-end devices in the Internet of Things: A survey", IEEE Internet Things Journal, vol. 3, no. 5, pp. 720-734, Oct. 2016.
    [2] D. Lake, A. Rayes and M. Morrow, "The Internet of Things", The Internet Protocol Journal, vol. 15, no. 3, pp. 10-19, Sep. 2012.
    [3] P. Semasinghe, S. Maghsudi and E. Hossain, "Game theoretic mechanisms for resource management in massive wireless IoT systems", IEEE Communications Magazine, vol. 55, no. 2, pp. 121-127, Feb. 2017.
    [4] A. Musaddiq, Y. B. Zikria, O. Hahm, H. Yu, A. K. Bashir and S. W. Kim, "A survey on resource management in IoT operating systems", IEEE Access, vol. 6, pp. 8459-8482, 2018.
    [5] The FIT consortium, IoT-LAB Main Repository, [online] Available: https://github.com/iot-lab/iot-lab/wiki/Libraries , last retrieve 7 July 2020.
    [6] A. Schoofs, M. Aoun, P. van der Stok, J. Catalano, R. S. Oliver and G. Fohler, "A framework for time-controlled and portable WSN applications", Sensor Applications, Experimentation, and Logistics: First International Conference, SENSAPPEAL 2009, Athens, Greece, pp. 126-144, Sep, 2009.
    [7] A. Dunkels, F. Osterlind and Z. He, "An adaptive communication architecture for wireless sensor networks", Proceedings of the 5th International Conference on Embedded Networked Sensor Systems, Sydney, Australia, pp. 335-349, Nov. 2007.
    [8] P. Dutta and A. Dunkels, "Operating systems and network protocols for wireless sensor networks", Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences, vol. 370, no. 1958, pp. 68-84, Jan. 2012.
    [9] F. Javed, M. K. Afzal, M. Sharif and B.-S. Kim, "Internet of Things (IoTs) operating systems support networking technologies applications and challenges: a comparative review", IEEE Communications Surveys & Tutorials, vol. 20, no. 3, pp. 2062-2100, 3rd Quart 2018.
    [10] R. Garibotti, L. Ost, A. Butko, R. Reis, A. Gamatie and G. Sassatelli, "Exploiting memory allocations in clusterised many-core architectures", IET Computers & Digital Techniques, vol. 13, no. 4, pp. 302-311, July 2019.
    [11] R. Garibotti et al., "Efficient embedded software migration towards clusterized distributed-memory architectures", IEEE Transactions on Computers, pp. 2645-2651, Aug. 2016.
    [12] H. Kasai, "Embedded middleware and software development kit for area-based distributed mobile cache system", IEEE Transactions on Consumer Electronics, vol. 59, no. 1, pp. 281-289, Feb. 2013.
    [13] H. Pérez and J. J. Gutiérrez, "Enabling data-centric distribution technology for partitioned embedded systems", IEEE Transactions on Parallel and Distributed Systems, vol. 27, no. 11, pp. 3186-3198, 2016.
    [14] A.D. Kshemkalyani, M. Singhal, Distributed Computing: Principles, Algorithms, and Systems, Cambridge University Press, March 2011.
    [15] Amazon Web Services, FreeRTOS ™ Real-time operating system for microcontrollers, [online] Available: https://www.freertos.org/index.html, last retrieve 7 July 2020.
    [16] B. Barney, Lawrence Livermore National Laboratory, Message Passing Interface (MPI), [online] Available: https://computing.llnl.gov/tutorials/mpi/, last retrieve 7 July 2020.
    [17] Arm Holdings, ARMv7-M Architecture Reference Manual, [online] Available: https://developer.arm.com/documentation/ddi0403/ed/, last retrieve 7 July 2020.

    下載圖示 校內:2025-08-18公開
    校外:2025-08-18公開
    QR CODE