Applications of Virtualization in Systems Design JYVÄSKYLÄ STUDIES in COMPUTING 153
Total Page:16
File Type:pdf, Size:1020Kb
JYVÄSKYLÄ STUDIES IN COMPUTING 153 Nezer Jacob Zaidenberg Applications of Virtualization in Systems Design JYVÄSKYLÄ STUDIES IN COMPUTING 153 Nezer Jacob Zaidenberg Applications of Virtualization in Systems Design Esitetään Jyväskylän yliopiston informaatioteknologian tiedekunnan suostumuksella julkisesti tarkastettavaksi yliopiston Ylistönrinteellä, salissa YlistöKem4 kesäkuun 15. päivänä 2012 kello 12. Academic dissertation to be publicly discussed, by permission of the Faculty of Information Technology of the University of Jyväskylä, in Ylistönrinne, hall YlistöKem4, on June 15, 2012 at 12 o'clock noon. UNIVERSITY OF JYVÄSKYLÄ JYVÄSKYLÄ 2012 Applications of Virtualization in Systems Design JYVÄSKYLÄ STUDIES IN COMPUTING 153 Nezer Jacob Zaidenberg Applications of Virtualization in Systems Design UNIVERSITY OF JYVÄSKYLÄ JYVÄSKYLÄ 2012 Editor Timo Männikkö Department of Mathematical Information Technology, University of Jyväskylä Pekka Olsbo, Ville Korkiakangas Publishing Unit, University Library of Jyväskylä URN:ISBN:978-951-39-4763-7 ISBN 978-951-39-4763-7 (PDF) ISBN 978-951-39-4762-0 (nid.) ISSN 1456-5390 Copyright © 2012 , by University of Jyväskylä Jyväskylä University Printing House, Jyväskylä 2012 ABSTRACT Zaidenberg, Nezer Jacob Applications of Virtualization in Systems Design Jyväskylä: University of Jyväskylä, 2012, 288 p. (Jyväskylä Studies in Computing ISSN 1456-5390; 153) ISBN 978-951-39-4762-0 (nid.) ISBN 978-951-39-4763-7 (PDF) Finnish summary Diss. In recent years, the field of virtualization has generated a lot of attention and has demonstrated massive growth in usage and applications. Recent modification to the underlying hardware such as Intel VT-x instruc- tions and AMD-v instructions have made system virtualization much more effi- cient. Furthermore, recent advances in compiler technology have led the process virtual machine to dominate not only modern programming languages such as C# and Java but also in “ancient" programming languages such as C, C++ and Objective-C. As a consequence of this trend, virtual services and applications using vir- tualization have started to spread. The rise of technologies such as storage virtu- alization, virtualization on clouds and network virtualization in clusters provide system designers with new capabilities that were once impossible without vast investment in development time and infrastructure. This work describes several problems from the fields of Internet stream- ing, kernel development, scientific computation, disaster recovery protection and trusted computing. All of these problems were solved using virtualization tech- nologies. The described systems are state-of-the-art and enable new capabilities that were impossible or difficult to implement without virtualization support. We describe the architecture and system implementations as well as provide open source software implementations. The dissertation provides an understanding of both the strengths and the weaknesses that are connected by applying virtualization methods to system de- sign. Virtualization methods, as described in this dissertation, can be applicable to future applications development. Keywords: Virtualization, Storage Virtualization, Cloud Computing, Lguest, KVM, QEMU, LLVM, Trusted computing, Asynchronous mirroring, Repli- cation, Kernel Development, Prefetching, Pre-execution, Internet Stream- ing, Deduplication Author Nezer J. Zaidenberg Department of Mathematical Information Technology University of Jyväskylä Finland Supervisors Professor Pekka Neittaanmäki Department of Mathematical Information Technology University of Jyväskylä Finland Professor Amir Averbuch Department of Computer Science Tel Aviv University Israel Reviewers Professor Carmi Merimovich Department of Computer Science Tel Aviv-Jaffa Academic Collage Israel Professor Jalil Boukhobza Department of Computer Science Université de Bretagne Occidentale France Opponent Professor Juha Röning Department of Electrical and Information Engineering University of Oulu Finland ACKNOWLEDGEMENTS Without the knowledge and assistance of the mentioned below, this work would not have been possible. I would like to take this opportunity to recognize thank, and acknowledge the following people and Institutions. First and Foremost, it was a privilege to have Prof. Amir Averbuch as su- pervisor. I wish to extend my gratitude to Amir for his support and assistance. I have been working with Amir since 2001, when Amir tutored me during my M.Sc thesis. Amir’s support throughout the years has made this work possible. I wish to express my gratitude and warmest thanks toward my second su- pervisor Prof. Pekka Neittaanmäki for his review, guidance and assistance with all things big and small. Chapter3 presents LgDb, joint work with Eviatar Khen, a co-operation that was very stimulating for both of us. Chapter4 presents AMirror, joint work with Tomer Margalit. Working with Tomer was interesting and mutually beneficial. Chapter5 presents Truly-Protect, joint work with Michael Kiperberg. The cooperation with Michael was very diligent and will also lead to more future work. Chapter6 presents a LLVM-Prefetch, joint work with Michael Kiperberg and Gosha Goldberg. Chapter7 presents PPPC system, joint work with Prof. Amir Averbuch and Prof. Yehuda Roditi. The work is inspired by systems developed by vTrails. A start-up I founded. I would also like to thank the other collaborators I have worked with, that is described in chapter8, Tamir Erez, Limor Gavish and Yuval Meir. Furthermore, this work wouldn’t have been complete without insightful, helpful and often frustrating comments by my reviewers Prof. Jalil Boukhobza, Prof. Carmi Merimovich and the comments of Prof. Tapani Ristaniemi as well as countless other anonymous reviewers of our peer-reviewed papers and posters. I would like to express my gratitude to the staff of the Department of Math- ematical Information Technology for their help and assistance with solving ev- eryday problems. Particularly Timo Männikkö for his review of the manuscript and Kati Valpe and Rantalainen Marja-Leena for all their help. Finally, I wish to thank my parents and my family and all my friends for their moral support and interest in my work, especially my dearest partner Vered Gatt for her patience, encouragement and review of the work and my brother Dor Zaidenberg for his insightful comments. I greatly appreciate the support of the COMAS graduate school, STRIMM consortium and Artturi and Ellen Nyyssönen foundation that provided funding for the research. I owe a debt of gratitude to my faithful proof-reader, Ms. Shanin Bugeja. If this monograph is reasonably free from error it is due in no small measure to her meticulous and ruthless application of the red pen. LIST OF FIGURES FIGURE 1 The flow and the functional connections among the chapters in the dissertation ................................................................ 24 FIGURE 2 Type I and Type II hypervisors .............................................. 28 FIGURE 3 Process Virtualization............................................................ 29 FIGURE 4 Multiple operating systems running on virtual environments on a single system................................................................. 32 FIGURE 5 iPhone development using device and simulator ..................... 33 FIGURE 6 Desktop Virtualization .......................................................... 36 FIGURE 7 Microsoft Application Virtualization....................................... 38 FIGURE 8 Application virtual machine - OS and Application viewpoints .. 39 FIGURE 9 Common Language Runtime (CLR) Environment.................... 40 FIGURE 10 Android (Dalvik) Environment .............................................. 40 FIGURE 11 Using VIP via LVS................................................................. 42 FIGURE 12 Virtual Private Network (VPN). ............................................. 43 FIGURE 13 Cloud Computing Environments ........................................... 44 FIGURE 14 The LgDb System Architecture............................................... 51 FIGURE 15 The LgDb System - x86 Privileges Levels ................................ 52 FIGURE 16 Flow Chart of Code Coverage Operation................................. 56 FIGURE 17 Flow Chart of Profile Operation ............................................. 57 FIGURE 18 Generic replication System .................................................... 66 FIGURE 19 Synchronous replication System ............................................. 67 FIGURE 20 Asynchronous replication System........................................... 68 FIGURE 21 Schematic Architecture of the AMirror Tool............................. 73 FIGURE 22 Why Volume Groups are Required ......................................... 75 FIGURE 23 Deduplication on the Network Traffic ..................................... 77 FIGURE 24 Saving of Bandwidth............................................................. 78 FIGURE 25 Just-In-Time Decrypting ....................................................... 92 FIGURE 26 Just-In-Time Decryption Performance. Program Running Time in Seconds as a Function of Input Size. Note the Logarithmic Scale. ...................................................................................100 FIGURE 27 Program Decryption Time (in cycles) Using AES and our Ci- pher with Different Values of p. ` = 4. a = 14.......................... 101 FIGURE 28 Program Decryption Time (in cycles) Using AES and Our Ci- pher with Different Values of p. ` = 4.