Have one to sell? Sell yours here
Virtual Machine Design and Implementation C/C++
 
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Virtual Machine Design and Implementation C/C++ [Paperback]

Bill Blunden (Author)
3.1 out of 5 stars  See all reviews (17 customer reviews)


Available from these sellers.



Book Description

February 28, 2002
With the emergence of multiplatform production systems and network-centric computing, the software industry has witnessed the resurgence of the virtual machine. Rather than committing to any single operating system, software engineers have embraced platform-neutral development tools and run-time environments. Virtual Machine Design and Implementation in C/C++ provides an in-depth look at the construction and underlying theory of a fully functional virtual machine and an entire suite of related development tools.

The book begins with a discussion of the theoretical underpinnings of the author's HEC virtual machine and its fundamental design goals, and continues with a section on the implementation of the virtual machine and its debugger. The final section focuses on the HEC assembler, including its interface to the native operating system, interrupts, the assembly language, and how to implement object-oriented constructs. There is also an extended discussion of porting the HEC virtual machine to other platforms. To assist in accomplishing this goal, the author offers a critical path analysis of the development process so that readers can build both their own virtual machine and an entire operating system.

The companion CD contains the source code for both the Win32 and Linux ports of the HEC distribution, including the HEC virtual machine, assembler, debugger, and associated development utilities.



Editorial Reviews

About the Author

Bill Blunden has a bachelor's degree in physics from Cornell and a master's degree in operations research. He has spent the past ten years performing R&D on enterprise middleware, implementing distributed computing software, and working with security protocols.

Product Details

  • Paperback: 500 pages
  • Publisher: Wordware Publishing, Inc. (February 28, 2002)
  • Language: English
  • ISBN-10: 1556229038
  • ISBN-13: 978-1556229039
  • Product Dimensions: 8.9 x 7.9 x 1.9 inches
  • Shipping Weight: 3.2 pounds
  • Average Customer Review: 3.1 out of 5 stars  See all reviews (17 customer reviews)
  • Amazon Best Sellers Rank: #1,540,733 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

17 Reviews
5 star:
 (6)
4 star:
 (1)
3 star:
 (2)
2 star:
 (4)
1 star:
 (4)
 
 
 
 
 
Average Customer Review
3.1 out of 5 stars (17 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

26 of 27 people found the following review helpful:
2.0 out of 5 stars Should be more synchronized with recent development, January 3, 2004
By 
Boris Burger (Bratislava, Slovakia) - See all my reviews
This review is from: Virtual Machine Design and Implementation C/C++ (Paperback)
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.

Targeting 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.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


19 of 20 people found the following review helpful:
1.0 out of 5 stars Fine points, but none are related to Virtual Machines., August 20, 2003
By 
This review is from: Virtual Machine Design and Implementation C/C++ (Paperback)
Though there were several topics that this book covered that I liked, the author (Bill Blunden) seems very confused about many other things. It was obvious that Mr. Blunden's formal education was not in computer science. He would go through lots of trouble to "optimize" protions of code (instruction handlers), making them unreadable, that any decent optimizing compiler could have taken care of. Then he would go and do something silly like passing data (argc and return values) between the VM and native libraries in XML. The 2 cases for using a native library call from VM code are for added speed or to make a system call. The conversion to/from XML adds bunches of overhead where it is needed least.
The author also says nasty things about his experience porting the HEC VM to Linux that don't make any sence (though the publisher seemed to really push the fact that there was a Linux port). He states that the only way to use a shared object library from a Linux program is to include it at compile/link time. This is silly, since under Linux, all shared object libraries are loaded at run time, even those that are specified to the linker (by way of ld-linux.so) (see dlopen(3) "from Solaris" and uselib(2)). Besides, Java does it, so I can't be imposible. The author says nasty things about the documentation of Linux sys-calls and libraries with his distribution in comparison to MSDN. What he doesn't notice is that he has paid for WindowsXP, Visual C++, and MSDN (3 separate products or 2 if MSDN comes with VC++). Under Linux, this was not the case, as all he paid for was a distribution and got the developer's tools and the man pages (specifically sections 2 and 3) as well as the standard OS (as compared with WinXP).
His Linux port of HEC was half hearted, in that he seemed to have bought a distribution (new to him) with the intent to port, while he was used to programming with VC++ for Windows. He claims early in the book to have been an old Unix guy, but I find that hard to believe. I am a Linux programmer. I rarly write anything for any MS OS that is not trivial. I know that if I were asked to, I would have a bunch of learning to do.
Another thing about this book that was annoying was the constant process of going over a topic, seemingly as an included feature (like multi-threading) in the VM, only for him to decide that it would not be added. Because of this, his VM seems weaker to me.
The author also was very anal about not running in Virtual Memory. WHY?? It should be a user choice. He omited the restriction from the Linux port because he couldn't figure out an easy way to find the free memory (parsing /proc/meminfo was too hard, while parsing XML in the dynamic loaded library system was not, no mention of free(1)).
Further, the files on the CD (under linux/ ) are not set to reasonable permissions and he uses shell scripts where Makefiles would normally be used.
Many other things that I didn't like, but I'm tired of typing.
Things that I did like were his coverage of the implementation dynamic binding of functions/methods in object oriented programming and his coverage of 2 versions of exception handling.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


18 of 19 people found the following review helpful:
3.0 out of 5 stars Not an advanced book., August 22, 2002
By 
G. Madrid (Arlington, MA United States) - See all my reviews
(REAL NAME)   
This review is from: Virtual Machine Design and Implementation C/C++ (Paperback)
I was extremely disappointed with this book, especially as it received so many positive reviews here on Amazon.

To begin with, this book is billed for intermediate to advanced programmers. This book has little to offer for an "advanced" programmer. However, it's not bad for an advanced beginner to intermediate reader. The concepts discussed are simplistic. Only one short chapter is dedicated to the actual virtual machine. Blunden devotes more pages to discussion of basic data structures like symbol tables and hash tables than he does to his virtual machine. His biggest chapter is devoted to implementing a macro assembler for his machine. A discussion I would expect in a book on compiler design, but which I found somewhat unwelcome here.

His coverage of virtual machines leaves much to be desired. The two primary topics that interested me, multi-threading and garbage collection, aren't even covered. Blunden describes them as complex topics, and therefore he leaves them out of his virtual machine. Since the reason I read books is for discussion of "complex" topics, this feels more like a cop-out than a design decision to me.

If you read his code, please don't try to emulate his coding style. He describes data types that he never uses, choosing instead to reimplement concepts every time he uses them. He exports public members of C++ classes, uses descriptive function arguments like "ptr", and spends a lot of time talking about optimizing things that don't really require optimization. (Loop unrolling your debugging statements?) He switches to C++ halfway through the book, but fails to take advantage of any of C++'s strengths. I almost get the feeling his editor told him that his book would sell better if he listed C++ in the title.

I'm sure Blunden is a smart man, so I'll give him the benefit of the doubt and assume that his assembly language background is peeking through. But if your interest is virtual machines, I suggest one of the many good books on the Java VM. If your interest is compilers, stick with the Dragon book, or check out Allen Holub's book if the Dragon book is too rigorous. If you're looking to learn C or C++, look elsewhere.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
First Sentence:
"In 1965, Gordon Moore predicted that every 18 to 24 months, the number of transistors that could be put on a chip would double." Read the first page
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
current byte, bytecode segment, bytecode executable, virtual machine options, bytecode section, line containing declaration, second register operand, hash slot, assembler implementation, int yrs, bytecode translation, hash table slot, invalid opcode, extendable array, allocate local storage, bitwise rotation, gateway routine, assembly language source file, symbol repository, instruction handlers, int retval, handling vector, heap segment, string storing, anonymous pipes
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Virtual Machine Interrupts, Virtual Machine Implementation, Advanced Topics, Inputs None Outputs, Instruction Opcode Meaning Encoding, Moore's Law, John Wiley, Visual Studio, Instruction Meaning, Andrew Tanenbaum, Prentice Hall, Inputs Outputs, Chicago Stock Exchange, Visual Source Safe, Dragon Book, Howard Bloom, James Gosling, Second Edition
New!
Books on Related Topics | Concordance | Text Stats
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:





Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   





Look for Similar Items by Category


Look for Similar Items by Subject