Chapter 9. JPC: An x86 PC Emulator in Pure Java
Principles and properties | Structures | ||
---|---|---|---|
Versatility | ✓ | Module | |
Conceptual integrity | Dependency | ||
Independently changeable | ✓ | Process | |
✓ | Automatic propagation | Data access | |
Buildability | |||
✓ | Growth accommodation | ||
✓ | Entropy resistance |
“Emulators are slow and Java is slow; thus the combination could only mean computation at a snail’s pace.” As this conventional wisdom would suggest, the first JPC prototype ran 10,000 times slower than a real machine.
Nevertheless, a pure Java x86 PC emulator is a compelling idea—imagine booting Linux and Windows inside a secure Java Sandbox while remaining fast enough to be practical. Not that this task was ever likely to be easy, as it required replicating the internals of one of the most complex pieces of machinery humankind has produced. Navigating the task of reproducing the physical x86 PC design, layered on top of the Java Virtual Machine, and then fitting the result inside the security restrictions of the Java Applet sandbox has been an often difficult journey of discovery.
On the way we have experienced computing challenges seldom encountered by modern software engineers, but which offer timely reminders of the fundamentals usually taken for granted. Now we have a beautiful architecture that shows that pure Java emulation of x86 hardware is possible, and also fast enough to be practical after all.
Introduction
With the increasing processor speed and network performance enjoyed by even domestic ...
Get Beautiful Architecture now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.