| 研究生: |
馮堃齊 Feng, Kun-Chi |
|---|---|
| 論文名稱: |
改善JVM之共用物件存取方式以增進OSGi應用程式間之獨立性 An Approach to Enhance JVM to Support the Isolation between OSGi Applications |
| 指導教授: |
侯廷偉
Hou, Ting-Wei |
| 學位類別: |
碩士 Master |
| 系所名稱: |
工學院 - 工程科學系 Department of Engineering Science |
| 論文出版年: | 2009 |
| 畢業學年度: | 97 |
| 語文別: | 中文 |
| 論文頁數: | 33 |
| 中文關鍵詞: | 獨立性 、共用物件 、開放式服務閘道平台 、Java虛擬機器 |
| 外文關鍵詞: | Isolation, Shared Object, JVM, OSGi |
| 相關次數: | 點閱:148 下載:1 |
| 分享至: |
| 查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報 |
OSGi平台是建構在JVM(Java Virtual Machine) 上的開放式服務平台,所以OSGi上所安裝的服務及應用程式都是以Java撰寫而成,每個服務或應用程式都稱為一個服務包(bundle)。在OSGi平台上可以同時執行多個服務包以提供不同服務,也就因此會產生每個服務包對於OSGi平台上面的共用物件的存取及獨立性問題。
本論文針對 OSGi 平台上共用資源的獨立性問題做探討,包含共用資源與空指標等問題,並對此問題提出改善方法。我們在各服務包要存取共用物件時先紀錄下來並製作備份,之後若又有其他服務包要存取同一個物件時,便給予相對應的備份,如此可以解決共用物件被有錯誤或是惡意的服務包所竄改的問題。我們以JamVM 以及Knopflerfish 做為實驗環境,實作了此機制,效能量測顯示此機制平均每執行一次putfield 指令需額外耗費0.375 毫秒。
OSGi is an open platform based on JVM (Java Virtual Machine). The applications/services installed on OSGi platforms are written in Java. Every OSGi application/service is called a bundle. An OSGi platform can execute many bundles concurrently in order to provide different services. Every bundle installed on an OSGi platform may have the isolation issue, which includes the shared object(s) issue and the null pointer issue.
In this thesis, we propose a mechanism to prevent shared resources from being modified by some buggy or malicious bundle(s). We propose that when a bundle wants to access variables of shared resources, the bundle’s name, accessed variable’s name and value are recorded and when any other bundles want to access this variable hereafter, each bundle is returned a copy of the value of the shared variable. We implemented the proposed mechanism on Knopflerfish and JamVM. Performance measure shows that it has the overhead, in average, of 0.375 ms per putfield bytecode instruction.
[1] GNU Classpath. Available from: http://www.gnu.org/software/classpath/.
[2] Java Community Process, JSR 121 – Application Isolation API Specification. Available from: http://jcp.org/aboutJava/communityprocess/final/jsr121/index.html.
[3] javap - The Java Class File Disassembler. Available from: http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/javap.html.
[4] Kaffe Virtual Machine. Available from: http://www.kaffe.org/.
[5] Knopflerfish. Available from: http://www.knopflerfish.org/.
[6] G. Back, W. Hsieh, and J. Lepreau, "Processes in KaffeOS: Isolation, Resource Management, and Sharing in Java," in Proceedings of the Fourth Symposium on Operating Systems Design and Implementation, San Diego, CA, USA, pp. 333-346, Oct. 2000.
[7] W. Binder, "Secure and Reliable Java-Based Middleware – Challenges and Solutions," in Proceedings of the First International Conference on Availability, Reliability and Security, pp. 662-669, 2006.
[8] Grzegorz Czajkowski, "Application Isolation in the Java™ Virtual Machine," in Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp. 354-366, 2000.
[9] N. Geoffray, G. Thomas, C. Clément, and B. Folliot. "A Lazy Developer Approach: Building a JVM with Third Party Software," in Proceedings of the International Symposium on Principles and Practice of Programming In Java, Modena, Italy, pp. 73–82, September 2008.
[10] N. Geoffray, G. Thomas, and C. Clément, "Towards a New Isolation Abstraction for OSGi," in Proceedings of the 1st workshop on Isolation and integration in embedded systems, Glasgow, Scotland, pp. 41-45, 2008.
[11] N. Geoffray, G. Thomas, G. Muller, P. Parrend, S. Fr´enot , and B. Folliot, "I-JVM: a Java Virtual Machine for Component Isolation in OSGi," Technical Report RR no. 6801, Jan 2009.
[12] Robert Lougher, JamVM, Available from: http://jamvm.sourceforge.net/.
[13] OSGi Alliance, OSGi Service Platform Specification, version 4, October 2005. Available from: http://www.osgi.org/Release4/HomePage.
[14] SUN Microsystems, The Java Language Specification, 3rd Edition. Available from: http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html.
[15] T. Von Eicken, C.-C. Chang, G. Czajkowski, and C. Hawblitzel. "J-Kernel: A capability-based operating system for Java," Lecture Notes in Computer Science 1603, pp. 369–394, 1999.