|
楼主 |
发表于 2008-5-5 12:37:43
|
显示全部楼层
Preface:
The book begins by surveying the variety of VMs, putting them into perspective
and building a framework for discussing VMs. The subsequent chapters
describe the major types of VMs in an organized way, emphasizing the common,
underlying technologies. Following is a rough outline summarizing each
chapter.
In Chapter 1 we introduce the concept of abstraction and define the interfaces
that are prevalent in today's computer systems. This is followed by a
discussion of virtualization and its relationship to the interfaces. The notion
of computer architecture is introduced next, followed by a survey of different
types of virtual machines. VMs are shown to fall into two main categories,
process virtual machines and system virtual machines. We end the chapter
by refining this categorization further and suggesting a taxonomy for virtual
machines.
In Chapter 2 we address issues related to the emulation of a source instruction
set architecture (ISA) on a target ISA. We demonstrate the workings of a
basic interpreter and show how threaded interpretation can help improve performance.
The techniques developed are demonstrated using a CISC source
ISA, the Intel IA-32, and a RISC target ISA, the IBM PowerPC. We then introduce the notion of binary translation, and discuss the problems of code
discovery and code location. This is followed by a discussion of the handling of
control transfers. Many ISAs have special features (in some cases, they might
be called "quirks") that must be handled in special ways. These are discussed
next. The chapter is rounded out with a case study of emulation in the Shade
simulation system.
Chapter 3 discusses the implementation of process virtual machines. A process
virtual machine supports an individual guest application program on a host
platform consisting of an operating system and underlying hardware. We discuss
the implications of VM compatibility and show how the state of a machine,
consisting ofthe register state and the memory state, is mapped and maintained
in a process virtual machine. We address the issues of self-modifying code and
of protecting the region of memory used by the VM runtime software. VM
emulation consists of two parts. First, the emulation of the instruction set is
discussed, with reference to interpretation and binary translation discussed
in Chapter 2. This leads to a discussion of code caching techniques. Next,
the emulation of the interface to the host operating system is addressed. We
end the chapter by describing the FX!32 system, which embodies many of the
fundamental ideas discussed in the chapter.
Chapter 4 focuses on techniques for the optimization of translated code
for better emulation performance. It discusses the framework needed to perform
such optimizations and the profile information that must be gathered at
program execution time in order to facilitate optimizations. Various profiling
techniques are discussed. Because optimizations often work better on larger
code blocks, the concepts of dynamic basic blocks, superblocks, traces, and
tree groups are introduced. The chapter includes an extensive discussion on
code re-ordering and its limitations. Various types of code optimizations, both
local and inter-block, are presented. The chapter concludes with a case-study of
Dynamo, a dynamic binary optimizer, which applies optimization techniques
in a system where the source and target ISAs are identical.
Chapter 5 introduces high-level language virtual machines and traces the
transition from the early Pascal P-code VMs to object-oriented VMs. The
emphasis in this chapter is on the architecture of high-level language VMs,
especially those features supporting object-oriented programming and security.
The two important object-oriented VMs of today, namely the Java Virtual
Machine and the Microsoft CLI, are described. The features of their bytecode,
stack-oriented instruction sets are described. In both cases, the description of
the instruction set is supplemented by a discussion of the overall platform that
augments the virtual machines with a set of libraries and APIs.
Chapter 6 continues the discussion of high-level language VMs by focusing
on their implementation. As in the preceding chapter, more attention is given
xiv 9 Preface
to Java because of its widespread usage and the variety in its implementations.
Two aspects given special consideration are security and memory management.
The importance of garbage collection is discussed along with techniques
for performing garbage collection. The interaction of Java objects with programs
written natively outside the Java environment is discussed next. We then
describe how the performance of Java can be enhanced through optimizations
of code using techniques described in Chapter 4 as well as new techniques that
are specific to the object-oriented paradigm. The concepts in the chapter are
brought together using a case-study of the Jikes Research Virtual Machine.
In Chapter 7 we discuss co-designed virtual machines where a conventional
ISA is implemented through a combination of an implementation-specific ISA
and translation software that runs in concealed memory. We discuss techniques
for mapping the state of the original ISA onto the implementation ISA and for
maintaining the code cache containing translated code. Various sticky aspects,
including the implementation of precise interrupts and page faults, are also
discussed. We end the chapter with two case studies: the Transmeta Crusoe
processor and the IBM AS/400 processor.
Chapter 8 deals with the classic system virtual machines. A system virtual
machine supports a complete guest operating system and all its applications
on a host platform. We provide a motivation for these virtual machines and
outline the basic ways for implementing system virtual machines, including
native and hosted VMs. We discuss techniques for the virtualization of the
three main system resources: processors, memory, and I/O. The conditions for
virtualizability of a processor, as first enunciated by Popek and Goldberg in
the early '70s, are developed. Also discussed are techniques for virtualization
when these conditions are not satisfied by an ISA. Memory virtualization is
discussed with attention given both to systems with architected page tables and
architected TLBs. Then virtualization is discussed for a variety of I/O devices.
We next turn our attention to hardware assists to improve the performance of
VM systems with the IBM z/VM as a running example. We end the chapter
with two case studies, that of a hosted VM system developed by VMware, and
that of the VT-x (Vanderpool) technology developed by Intel for their IA-32
architecture.
In Chapter 9 we shift our attention to the virtualization of multiprocessor
systems. We introduce the notion of system partitioning and develop a taxonomy
for different types of partitioning. We then discuss the principles behind
physical partitioning and logical partitioning. The IBM LPAR feature is presented
as a case study in logical partitioning. Following this is a discussion about
logical partitioning using hypervisors. We then turn to a system VM-based
approach to multiprocessor virtualization using a research system, Cellular
Disco, as a case study. We end the chapter with a discussion of multiprocessor
Preface 9 xv
virtualization where the guest and host platforms have different ISAs, with
special attention on bridging the differences in memory models between a host
and a guest.
Chapter 10 is a discussion of emerging applications for virtual machine technology.
We focus on three application areas which we feel will be important in
the coming years. The first is security. We discuss the vulnerability to attacks of
modern computer systems and outline the principles behind intrusion detection
systems. The potential of VM technology in protecting and recovering
from attacks is discussed. The role of binary rewriting technology in security
is also discussed with reference to the RIO system. The second application we
focus on is that of migrating computing environments from one machine to
another. The techniques used in two systems, the Internet Suspend/Resume
system and the Stanford Collective system, are described. The commercial
application of this technology in VMware's VMotion is also discussed. Our
third emerging application is computational grids. We outline the motivation
behind the emergence of the grid as a computing infrastructure and compare it
to the motivations behind other types of virtual machines. We end the chapter
by showing how classic system virtual machines are proving to be an important
enabler for emerging grid systems.
The Appendix is essentially a condensed course in computer systems, providing
background material for the main chapters. It discusses the roles of
the processor, memory, and I/O in a computer system. This is followed by
a discussion of ISAs, including support for user applications as well as for
the operating system. Page tables and TLBs are discussed next. We follow
this with a discussion of the major components of an operating system and
the system call interface between an application and the operating system.
Finally we discuss multiprocessor architectures, including cluster architectures
and shared-memory multiprocessor systems. Memory coherence and memory
consistency issues in shared-memory systems are also addressed. |
|