Responsive image
博碩士論文 etd-0621111-143053 詳細資訊
Title page for etd-0621111-143053
論文名稱
Title
設計與實作使用者空間下之虛擬機器記憶體管理
The design and implementation of memory management of virtual machine in user-space
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
58
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2011-03-29
繳交日期
Date of Submission
2011-06-21
關鍵字
Keywords
記憶體管理、JAVA虛擬機器、嵌入式、Dalvik虛擬機器、Android
Android, Embedded system, Java virtual machine, memory management, Dalvik virtual machine
統計
Statistics
本論文已被瀏覽 5626 次,被下載 0
The thesis/dissertation has been browsed 5626 times, has been downloaded 0 times.
中文摘要
隨著智慧型手持裝置﹝Smart Handset﹞的普及化,嵌入式系統的設計和開發越來越受到討論,各種嵌入式系統問題也越來越受到重視,如裝置運作的穩定和效率問題,易於操作的人機介面設計,和滿足各種需求的多樣化應用程式設計,嵌入式系統已漸漸的深入大家的日常生活中。

在嵌入式系統上的應用程式開發,常受到系統本身資源的限制。相較於一般電腦系統,嵌入式系統的硬體資源是很有限的,其中也包含了記憶體。因此程式開發往往需要考慮記憶體不足的問題,程式設計也要避免大量的記憶體配置導致程式大量佔用系統記憶體,影響系統的正常運作,造成系統危障。

JAVA是常見的嵌入式程式設計語言。基於JAVA的高度可攜性,程式可藉由JAVA虛擬機器﹝JAVA Virtual machine﹞輕易的達到跨平台的目的。但JAVA程式設計也同樣的有所限制,JAVA程式語言在開發上不允許對記憶體的直接存取,記憶體的配置與釋放隨著物件的生存時間全權由系統來控管,使用者無法確實的自行掌握記憶體使用情況。

這個研究主題在於對JAVA語言設計一組工具,應用到智慧型Android平台上的Dalvik虛擬機器﹝Dalvik Virtual machine﹞,負責操作記憶體的配置與釋放,讓使用者可以全權掌握記憶體,確保記憶體可重複利用,避免Memory Leak的問題造成系統癱瘓。
Abstract
With the popularity of Smart Handset devices, much more discussion of the design and development of embedded systems, some of embedded system problems such as the stability and efficiency of the device, the easy-operating interface design and a variety of application design are more and more important.

Application development in the embedded systems is often limited by the system resource such as memory. Compared with common computer systems, embedded system got very limited memory. Therefore, program development in the embedded systems often need to consider the problem of insufficient memory, and program design must also avoid using too large number of memory allocation to cause the program take up a lot of system memory, affecting the system operation, causing the system hazard.

Java is one of the common programming languages using in the embedded system development. Based on the high portability, Java programs can easily port to another system environment by using the Java virtual machine. However, the Java programming is also restricted, such as Java programming is not allowed to access memory space direct, and the memory allocation and release are all controlled by the system, rather than users.

The purpose of the research is to design a set of Java programming tools. It can be applied to Android Dalvik virtual machine, which is responsible for operating the memory allocation and release, to allow users to control memory so as to ensure that memory can be reused to avoid the system hazard caused by the system memory leak problem.
目次 Table of Contents
序言 _______________________________________________________________
誌謝 i
中文摘要 ii
英文摘要 iii
正文 _______________________________________________________________
一. 序論 1
1.1. 研究動機與目的 1
1.2. 論文大綱與架構 2
二. 虛擬機器介紹 3
2.1. Java 3
2.2. 虛擬機器 4
2.3. Java 虛擬機器 6
2.4. Dalvik 虛擬機器 7
2.5. 結論 9
三. 記憶體管理機制介紹 11
3.1. 自動回收優點 12
3.2. 自動回收問題 13
3.3. 自動回收演算機制 14
3.4. 自動回收實行策略 18
3.5. 結論 19
四. 程式設計 21
4.1. 記憶體管理機制 21
4.2. 記憶體配置演算法 26
4.3. 記憶體釋放演算法 27
4.4. 記憶體存取演算法 28
4.5. 其他功能 30
五. 程式實作 32
5.1. 程式實作架構 32
5.2. 記憶體管理類別 33
5.3. 整數型態管理類別 34
5.4. 浮點數型態管理類別 37
5.5. 字元型態管理類別 39
5.6. 總結 41
六. 程式效能分析 43
6.1. 速度測試結果 44
6.2. 記憶體測試結果 45
6.3. 結論 47
七. 程式應用展望 49
v
圖次__________________________________________________________________
圖2.1- C/C++編譯執行過程 6
圖2.2- JAVA 編譯執行過程 7
圖2.3- JAVA 應用程式的編譯過程 8
圖2.4- Android 應用程式的編譯過程 8
圖4.1-記憶體管理機制 22
圖4.2-可用的記憶體區塊管理情形 23
圖4.3-使用中的記憶體區塊管理情形 23
圖4.4-可用的碎裂記憶體區塊管理情形 25
圖4.5-使用中的碎裂記憶體區塊管理情形 25
圖4.6-碎裂記憶體區塊操作範例 26
圖4.7-可用記憶體區塊搜尋配置演算流程 27
圖4.8-記憶體區塊釋放演算流程 28
圖5.1-程式類別繼承關係 32
表次________________________________________________________________
表1.1-論文大綱 2
表2.1- JVM 與DVM 的差異 10
表3.1-記憶體回收演算機制相對比較 19
表4.1-管理圖位移量定義 25
表5.1-實作使用者記憶體管理模式 42
表6.1-程式速度測試結果 44
表6.2- JVM 管理模式記憶體使用測試結果 45
表6.3-使用者管理模式記憶體使用測試結果 46
參考________________________________________________________________
參考資料 50
參考文獻 References
Google Android :
[1] Rick Rogers, “Android application development”, 2009
[2] Meier, Reto, “Professional Android application development”, 2009
[3] Lauren Darcey, Shane Conder, “Android Application Development in 24 Hours”, 2010
[4] Mark L. Murphy, “Beginning Android 2”, 2010
[5] 佘志龍, “Google Android SDK開發範例大全”, 2009
[6] 楊文誌, “Google Android程式設計與應用”, 2009
[7] 韓超, “深入淺出Android系統原理及開發”, 2010

JAVA Language & JVM :
[8] Bruce A. Tate, “Beyond Java”, 2005
[9] Maurice Naftalin, Philip Wadler, “Java generics and collections”, 2007
[10] Bruce Eckel, “Thinking in Java”, 2008
[11] Y. Daniel Liang, “Introduction to Java programmng : comprehensive version”, 2009
[12] Deitel, Paul J, “Java : how to program”, 2010
[13] 蔡寶進譯, “Java虛擬機器”, 2000
[14] 洪維恩, “Java 2物件導向程式設計”, 2002
[15] 探矽工作室, “深入嵌入式Java虛擬機器: Inside KVM”, 2002
[16] 陳美君譯, “JAVA技術手册”, 2005
[17] 楊仁和譯, “深入淺出物件 導向分析與設計”, 2007

Memory Management :
[18] Richard Jones, “Garbage Collection: Algorithms for Automatic Dynamic Memory Management”, 1999
[19] Abraham Silberschatz, Peter Baer Galvin, Greg Gagne, “Operating system concepts”, 2008
Programming :
[20] Erich Gamma, Richard Helm, Erich Gamma, “Design Patterns: Elements of Reusable Object-Oriented Software”, 2000
[21] W.Richard Stevens, “Advanced.Programming.In.The.Unix.Environment”, 2005
[22] 黃國瑜, 葉乃菁, “資料結構”, 2003
[23] 吳偉明, “數據結構”, 2005

Website :
[24] Eclipse,
http://www.eclipse.org/
[25] Android Developers,
http://developer.android.com/index.html
[26] Java,
http://www.java.com/zh_TW/
[27] Java2 Platform Standard Edition 5.0, http://download.oracle.com/javase/1,5.0/docs/api/
電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:校內校外均不公開 not available
開放時間 Available:
校內 Campus:永不公開 not available
校外 Off-campus:永不公開 not available

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

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

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

QR Code