Most Helpful Customer Reviews
|
|
4 of 4 people found the following review helpful:
3.0 out of 5 stars
Should be more synchronized with recent development, 3 Jan 2004
I am more or less dissapointed with this book's contents, largely because I expected a bit more modern treatment of the subject.What greatly dissapointed me was that the author doesn't compare his VM against others, which is quite a pity because there are modern languages interpreted using VMs like Java, Perl, Python and many more. This and some more facts suggest that the author is not in sync with current development in the field. An another surprise for me is that the VM introduced is register oriented. I don't quite understand and agree with the arguments behind this choice, as opposed to stack based VMs. The author explains about computer processors that utilized the stack based architecture in the past that were outperformed by register based CPUs, thus they are not manufactured anymore. Which is a misleading fact, because registers of a VM are located in memory arrays, and suffer from the same efficiency penalties as the stack does. Targetting a register based VM is much more difficult than with stack based VMs, but the author doesn't take attention to this fact. More precisely, he doesn't say a word about generating code for his VM aside from a simple assembler, that is explained at great lengths in a separate chapter, which I find somewhat uninteresting and off the topic, because only a few people really write code for VMs in assembler. The book contains lots of code listings, that the author comments on well. The language used is much more C than C++, which is a pity in my opinion, but hey, the programming tastes differ. What is worth noting, the author doesn't go beyond a naive one-large-switch VM implementation, which is not to blame, but it would be appreciable if the author noted some optimization techniques for VMs like direct-threading, inline-threading and just-in-time compiling. Bill Blunden is overproductive in some areas, for example he tends to describe on a number of pages techniques like threading, but in the end only to explain that the VM doesn't contain any thread support at all. In the end, I enjoyed some parts of the book, as it contains some notes about computer science history. But I can't avoid the feeling that the author got stuck in '80s and is not aware of the recent development. I do not say that the book is bad, it just didn't fit me.
|
|
|
14 of 18 people found the following review helpful:
5.0 out of 5 stars
Mindblowing. The best technical book I've ever read., 19 Jun 2002
Wordware and Bill Blunden know how to make a great book. The writing is clear and direct, without becoming dry and boring. The examples are practical, and the coding conventions are easy to understand. Bill puts everything across in a way that doesn't insult programming experts, but that any amateur could understand.This book doesn't just cover virtual machines. It's a great book for anyone who wants to learn more about computer science in general. Bill explains how interrupt vectors work, how debuggers and assemblers work and how to make your own, the ins and outs of memory management and garbage collection, and how processors operate. It's all here. The virtual machine featured in this book (the author's own 'HEC' program) is deftly constructed, and Bill rationalizes every part of the design process. What's good about register based virtual machines as opposed to stack based ones? Once again, he covers it all. And, yes, his virtual machines does everything too. He even goes into working with TCP/IP, graphics, and so on. This isn't a featherweight virtual machine that adds numbers.. this can be used as an enterprise scale runtime engine! Virtual machines are rather important these days. The whole of Java operates on a stack based virtual machine. And the entire underbelly of Perl 6 (currently in development) is a register based virtual machine called Parrot. If you want to be at the forefront of modern machine theory and technology, you need to be up to date with virtual machines. Even .NET operates as a virtual machine. If you're a Comp Sci graduate, or even just a freelance programmer, you need to know this stuff! Even if you're already an expert and know all there is to know about virtual machines, this book is a fun read. I cannot do anything but wholeheartedly recommend this book. I've read hundreds of programming books over the years.. and this is by far the best.
|
|
|
2 of 2 people found the following review helpful:
3.0 out of 5 stars
Disappointing, but still worht a read, 13 Jul 2005
However, it is still worth reading, in a "this is the way NOT to do things" kind of way. This may sound a bit harsh, but Blunden breaks a lot of good programming practices: the source is not very well structures; Blunden #includes source files instead of using the linker, heavy use of #define macros instead of inline functions, big switch/case statements, use of magic numbers (even without comments!), and lots of code duplication.Both the assembler and VM sources could probably be reduced to half the amount of LOC, and at the same time cleaning up things majorly. Blunden tries to make the VM somewhat portable, but does a very poor attempt. It is funny how he stresses that secure code can only be done by writing for a VM, and then goes on to call inheritly unsafe C library functions, without any range checks. And the fact that VM programs must be run-time "verifiable" means that static data has to be painstakingly constructed at runtime, which also happens to add a lot of code bloat. The assembler also seems poorly designed; handcrafted tokenizing etc., large switch and strcmp if/else blocks instead of some decent table-based design, use of custom (and not-so-well) designed classes instead of STL, char* instead of std::string, et cetera - bugprone, hard to maintain, hard to read. The writing style of the book is rather good, though, and it's enjoyable to read. There's way too many pages being used for source listings though, and Blunden likes to bash Microsoft and Intel a little too much - often about subjects he clearly has no concept of ("I have no idea why anyone would want to use 4MB memory pages. I prefer to buy a lot of RAM and turn paging off entirely" - once sentence, two MAJOR blunders.) I would still recommend this book to anybody dealing with Virtual Machine design, though: it shows how to fall into just about every possible pitfall, and serves as a perfect example of how *not* to do things :)
|
|
|
|