| 研究生: |
蕭光哲 Hsiao, Kuang-tse |
|---|---|
| 論文名稱: |
嵌入式系統之客製化動態記憶體管理 Customized Dynamic Memory Management for Embedded Systems |
| 指導教授: |
陳 敬
Chen, Jing |
| 學位類別: |
碩士 Master |
| 系所名稱: |
電機資訊學院 - 電腦與通信工程研究所 Institute of Computer & Communication Engineering |
| 論文出版年: | 2009 |
| 畢業學年度: | 97 |
| 語文別: | 中文 |
| 論文頁數: | 106 |
| 中文關鍵詞: | 動態記憶體管理 、嵌入式系統 、微核心 |
| 外文關鍵詞: | dynamic memory management, microkernel, embedded systems |
| 相關次數: | 點閱:80 下載:2 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
越來越多的應用軟體被移植至嵌入式系統行動平台上,例如多媒體應用或是網路服務等等相關應用。這些應用軟體在執行期間由於有許多無法預期的資料產生,因此相當依賴動態記憶體的使用。在一般系統中如桌上型電腦,許多一般類型之記憶體管理機制即可滿足上述所說明之應用。但對於嵌入式系統,由於硬體資源相對缺乏與有較多限制,對於大量動態記憶體需求之應用可能無法順利執行,且一般類型之記憶體管理機制也不一定可以直接移植至嵌入式系統上。因此客製化動態記憶體管理機制的提供成為一個更好的解決方案。藉由不同的應用需求提供合適的動態記憶體管理機制使有限資源之嵌入式系統可被應用於不同情況,特別是針對有大量動態記憶體需求之應用。當客製化動態記憶體管理可被整合進軟體移植或是開發過程時,將可以低成本獲得更有效率地使用記憶體並獲得更好的執行效能。
客製化動態記憶體管理機制的實現分成兩部份:多樣化之動態記憶體管理機制與協助選擇記憶體管理機制之工具。藉由多種類型動態記憶體管理機制,應用軟體可依據其需求而選用較適合之動態記憶體管理機制。協助選擇記憶體管理機制工具依據應用程式對於動態記憶體需求情形,系統化地選擇合適之動態記憶體管理機制。因此,協助選擇記憶體管理機制工具必須先取得應用之動態記憶體需求相關資訊,才能依據此特性協助選擇合適動態記憶體管理機制。
本論文於Zinix微核心嵌入式系統實作客製化動態記憶體管理。除了在提供給應用程式之函數庫中有多種動態記憶體管理機制,更針對作業系統管理實體記憶體部分提供多種管理方式。且為了協助應用程式選擇合適之記憶體管理機制,本論文之實作包含應用程式記憶體使用情形之分析工具以協助應用程式選取合適之記憶體管理者。經實際於TI DaVinci開發板上使用H.264 Decoder與計算3D貼圖工具測試驗證本論文實作於嵌入式系統平台之成果,達到預期之效果,藉由記憶體之使用更有效率縮短測試程式之執行時間。
More and more applications for multimedia or for network services are ported to embedded systems. These applications usually depend on dynamic memory usage for their executions due to the inherent unpredictability in the processing. Many general dynamic memory management policies and their implementations are available to achieve good performance in general purpose systems. However, using a common and general purpose memory management mechanism might not be suitable for embedded system platforms due to resource constraint. Instead, customized dynamic memory management would be a suitable solution. When customizing dynamic memory management is integrated into the porting process or development process, it would be an effective approach to produce efficient memory usage and better performance at low cost.
This thesis presents the design and implementation of customized dynamic memory management for embedded system platforms. There are two parts in the customized dynamic memory management: configurable dynamic memory management mechanisms for applications and supporting tools which help select memory management mechanisms. By providing several dynamic memory management mechanisms, application developer may choose suitable management mechanisms based on the pattern of memory requests. The supporting tools provide information on memory usage by collecting data of memory requests at run time and analyzing the collected data. The data are collected from both application side and operating system side. Hence, the choice on suitable dynamic memory management mechanism might, at least, achieve balance between these two aspects and better performance.
The customized dynamic memory management of this thesis is implemented in the Zinix micro-kernel operating system running on TI DaVinci EVM. The implementation includes memory management policies in function library to be used by application software, and page management policies in operating system. To help choose suitable memory management policy for application software, a tool which analyzes memory usage of application software and suggests suitable choice, is implemented. The implementation is tested with H.264 decoder software and predicted 3D objects rendering software. The results are promising as predicted and the efficient memory usage makes the test programs execute faster.
[1] “ARM Architecture Overviews,” http://www.arm.com/products/CPUs/index.html.
[2] “ARM Architecture Version 6,” http://www.arm.com/pdfs/ARMv6_Architecture.pdf.
[3] “Intel x86 Based Architecture,” http://www.intel.com/products/processor/index.htm.
[4] “MIPS Processor Overviews,” http://www.mips.com/products/processors/.
[5] “TMS320DM644x Digital Media Processors,” http://focus.ti.com.cn/cn/lit/ml/sprt411b/sprt411b.pdf.
[6] A. Silberschatz, P. B. Galvin, G. Gagne,“Operating System Concepts,”7th edition, John Wiley & Sons, 2003.
[7] C. Poucet, S. Mamagkakis, D. Atienza, and F. Catthoor, “Systematic Intermediate Sequence Removal for Reduced Memory Accesses,” Proceedings of the 10th International Workshop on Software & Compilers for Embedded Systems, pp. 51-60, 2007.
[8] D. Atienza, S. Mamagkakis, F. Catthoor, J. M. Mendias1, and D. Soudris, “Modular Construction and Power Modeling of Dynamic Memory Managers for Embedded Systems,” Fourteenth International Workshop on Power and Timing Modeling, Optimization and Simulation, pp. 510-520, 2004.
[9] D. Atienza, S. Mamagkakis, F. Catthoor, J. M. Mendias, and D. Soudris, “Reducing Memory Accesses with a System-Level Design Methodology in Customized Dynamic Memory Management,” Workshop on Embedded Systems for Real-Time Multimedia, pp. 93-98, 2004.
[10] D. Atienza, S. Mamagkakis, F. Catthoor, J. M. Mendias, and D. Soudris, “Dynamic Memory Management Design Methodology For Reduced Memory Footprint In Multimedia And Wireless Network Applications,” Proceeding of Design, Automation and Test in Europe Conference and Exhibition, pp. 532-537, 2004.
[11] D. P. Bovet and M. Cesati, “Understanding the LINUX KERNEL,” 3rd edition, O’Reilly, 2005.
[12] “diet libc,” http://www.fefe.de/dietlibc/.
[13] “Dong Lea Memory Allocator,” http://gee.cs.oswego.edu/dl/html/malloc.html.
[14] E. D. Berger, B. G. Zorn, and K. S. McKinley, "Composing High-Performance Memory Allocators," In Proceedings of the 2001 ACM SIGPLAN Conference on Programming Language Design and Implementation, pp. 114-124, 2001.
[15] “GNU C Library,” http://www.gnu.org/software/libc/.
[16] J. Bonwick, “The Slab Allocator: An Object-Caching Kernel Memory Allocator,” In USENIX Summer, pp. 87-98, 1994.
[17] J. J. Labrosse, ”MicroC/OS II: The Real Time Kernel,” CMP Books, 2002.
[18] “H.264/AVC Software Coordination,” http://iphome.hhi.de/suehring/tml/.
[19] “Linux,” http://www.linux.org/.
[20] M. Gorman, “Understanding the Linux Virtual Memory Manager,” Prentice Hall PTR, 2004.
[21] M. Leeman, G. Deconinck, V. De Florio, D. Atienza, J. M. Mendias, C. Ykman, F. Catthoor, and R. Lauwereins, “Methodology For Refinement And Optimization Of Dynamic Memory Management For Embedded Systems In Multimedia Applications,” IEEE Workshop on Signal Processing Systems, pp. 369-374, 2003.
[22] M. S. Johnstone, and P. R. Wilson, “The Memory Fragmentation Problem: Solved?” International Symposium on Memory Management Proceedings of the First International Symposium on Memory Management, pp. 26-36, 1998.
[23] “Meteor,” http://sourceforge.net/projects/meteor.
[24] “Newlib,” http://sourceware.org/newlib/.
[25] Wikipedia, “Newlib,” http://en.wikipedia.org/wiki/Newlib.
[26] P. R. Wilson, M. S. Johnstone, M. Neely, and D. Boles, “Dynamic Storage Allocation, A Survey and Critical Review,” International Workshop on Memory Management, pp. 1-116, 1995.
[27] Spectrum Digital Inc., “DaVinci EVM Technical Reference,” http://c6000.spectrumdigital.com/davincievm/revf/files/DaVinciEVM_TechRef.pdf, 2007.
[28] “μC/OS-II,” http://www.micrium.com/products/rtos/kernel/rtos.html.
[29] “uCLibc,” http://www.uclibc.org/.
[30] “Windows CE,” http://www.microsoft.com/windowsembedded/zh-tw/products/default.mspx.
[31] “Windows CE 編程實驗(第四章 儲存管理),” http://blog.csdn.net/tanbin6833232/archive/2009/01/08/3732500.aspx
[32] Y. Smaragdakis, and D. Batory, “Mixin-Based Programming in C++,” Proceedings of the Second International Symposium on Generative and Component-Based Software Engineering-Revised Papers, pp. 163-177, 2000.
[33] 戴顯權, 陳瀅如, 王春清, “多媒體通訊,”3rd edition, 紳藍出版社, 2006.
[34] 洪文彬, “嵌入式微核心系統之設計與實作,” 碩士論文, 國立成功大學, 2005.