Armin Bahramshahry 1501-2024 Fullerton Ave
Total Page:16
File Type:pdf, Size:1020Kb
Armin Bahramshahry 1501-2024 Fullerton Ave. Vancouver, B.C. V7P 3G4 April 16, 2007 Dr. Matei Ripeanu Electrical and Computer Engineering The University of British Columbia 2332 Main Mall Vancouver, BC V6T 1Z4 Dear Dr. Ripeanu, Please find attached my final report for the EECE 496 course project. The report contains a description of the context, in which my work was performed, and includes an explanation of my research, design and implementation for this project. I also have mentioned a set of recommendations for future work. I look forward to your feedback. Thanks, Armin Bahramshahry. c.c. J. Pavelich UBC Electrical & Computer Engineering Department vanDisk: An Exploration in Peer-To-Peer Collaborative Back-up Storage System EECE 496 Term Paper Submitted to: Ms. Jane Pavelich and Dr. Matei Ripeanu Armin Bahramshahry 4/16/2007 ABSTRACT This term paper discusses the research, initial setup, and development of a new user interface component for the currently existing reliable peer-to-peer backup storage system developed by EECE 496 students. The objective of the project is to study the existing user-interface of the vanDisk project for compatibility with another project named “free-loader”. There has been research done on other technologies provided by Microsoft for Windows operating systems to design and implement a virtual drive with file system callbacks. The requirement of such component is to provide common “file-level” file system callback interface for both the vanDisk project and the free-loader project. It needs to have a reasonable throughput and CPU consumption. It is also very important to keep in mind the response time of the system. This report explains the research on four technologies offered by Microsoft named, Kernel-Mode Driver Framework (KMDF), User-Mode Driver Framework (UMDF), Windows Shell Namespace, and Installable File System (IFS). Later it explains the design decisions that have been made, and it will explain the initial design and development. Following which it will demonstrate the experiments that have performed on the developed functionalities and their results. Finally it will make a set of recommendations on the findings and conclude on how this project could be continued and how the findings are useful. ii Table of Contents ABSTRACT .....................................................................................................................................ii LIST OF FIGURES ......................................................................................................................... v LIST OF TABLES .......................................................................................................................... vi GLOSSARY .................................................................................................................................. vii LIST OF ACRONYMS ................................................................................................................ viii 1.0 INTRODUCTION ............................................................................................................... 1 2.0 BACKGROUND ................................................................................................................. 3 3.0 RESEARCH ......................................................................................................................... 4 3.1 Windows Kernel-Mode Driver Framework ..................................................................... 4 3.1.1 Framework Overview ............................................................................................... 4 3.1.2 I/O Flow Model......................................................................................................... 5 3.1.3 Build Process ............................................................................................................ 7 3.1.4 Installation Process ................................................................................................... 8 3.1.5 Debug Process ........................................................................................................... 8 3.2 Windows User-Mode Driver Framework ........................................................................ 9 3.2.1 Framework Overview ............................................................................................... 9 3.2.2 I/O Flow Model....................................................................................................... 10 3.2.3 UMDF Objects ........................................................................................................ 11 3.2.4 UMDF Callback Interfaces ..................................................................................... 13 3.3 Windows Shell Namespace ............................................................................................ 14 3.4 Windows Installable File System ................................................................................... 15 3.4.1 Overview ................................................................................................................. 15 3.4.2 Filter Manager Benefits .......................................................................................... 16 3.4.3 Architecture ............................................................................................................. 17 3.4.4 I/O Flow Model....................................................................................................... 18 4.0 DESIGN AND IMPLEMENTATION .............................................................................. 20 4.1 Design............................................................................................................................. 20 4.1.1 Overview ................................................................................................................. 20 4.1.2 Minispy .................................................................................................................. 20 4.1.2 Initial Design ........................................................................................................... 21 4.2 Implementation............................................................................................................... 22 iii 5.0 EXPERIMENTS ................................................................................................................ 24 5.1 Experiments .................................................................................................................... 24 5.2 Results and Analysis ...................................................................................................... 24 6.0 RECOMMENDATION ..................................................................................................... 28 7.0 CONCLUSION .................................................................................................................. 29 8.0 APPENDIX A .................................................................................................................... 30 9.0 APPENDIX B .................................................................................................................... 32 10.0 APPENDIX C .................................................................................................................... 34 11.0 APPENDIX D .................................................................................................................... 40 12.0 REFERENCES .................................................................................................................. 42 iv LIST OF FIGURES Figure 1 Lifecycle failure pattern for hard drives [2]. .................................................................... 1 Figure 2 KMDF I/O Flow [3] ......................................................................................................... 6 Figure 3 I/O Flow to UMDF Driver [6] ........................................................................................ 11 Figure 4 Simplified I/O Stack with Filter Manager and Minifilter Drivers [9] ............................ 18 Figure 5 File System Design ......................................................................................................... 22 Figure 6 Message Polling Stress Test Graph ................................................................................ 25 Figure 7 Message Polling Stress Test Graph at 0 Intervals .......................................................... 26 Figure 8 Message Polling CPU Usage Graph ............................................................................... 27 v LIST OF TABLES Table 1 Supporting Create, Cleanup, and Close Requests ............................................................ 10 Table 2 UMDF Object Types [6] .................................................................................................. 12 Table 3 Driver Callback Objects and Interfaces [6] ..................................................................... 14 Table 4 KM-UM Message Passing Stress Test Result ................................................................. 31 Table 5 KM-UM Message Passing CPU Consumption ................................................................ 33 Table 6 Mini-Filter Major Functions [10] .................................................................................... 39 Table 7 Batch File Description ..................................................................................................... 41 vi GLOSSARY Term or Phrase Definition Block