This chapter describes the architecture of an x86 pc emulator written in Java. The authors first give the motivation of developing the emulator despite the existence of emulators like QEMU and Bochs. They argued that those emulators have some security holes and need to be recompiled in order to run on a new host system. They also described why they choose an emulator instead of a VM. VMs need some degree of hardware support while Emulators are written completely in software and do not need any specific support from the underlying hardware. The emulator runs just like a normal application running on the computer and is therefore the most stable and secure way of creating virtual machines. Given these facts the authors decided to build as emulator in the JVM, which provides guaranteed security and performs good enough to stay practical.
After making the case for developing the JPC the authors focused on the most challenging aspect of emulation, which is dealing with performance. Applications running on the emulated machine incur significant software emulation overhead at runtime. So it was critical for JPC to deal and reduce the overhead of emulation. The authors took a very discipline approach and considered a series of performance tips in their architecture. I believe their approach to incorporating optimizations wherever it had a positive impact was very successful and is the right approach. Being able to boot a virtual DOS and run games within a secure JVM running on any machine is quite impressive.
I like the steps that the followed and presented at the end of the chapter as being the steps to a beautiful architecture. They focused on limited end-to-end prototyping of the complete system rather than prototyping components of the final product. This had the advantage that it allowed more flexibility and allowed to prove the concept before engaging in large scale work. This approach is unfortunately not always possible in commercial settings, where people do not have the luxury of getting paid for writing throwaway code. For an academic setting or for research teams at companies this is definitely a great recipe for creating beautiful architectures.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment