wk 13 -- virtual machine systems (1)
TRANSCRIPT
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
1/18
Virtual Machines 1 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Virtual Machine Systems
CS-502 Operating Systems
Slides excerpted from Silbershatz, Ch. 2
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
2/18
Virtual Machines 2 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Question
Can a small operating system simulate the
hardware of some machine so that
Another operating system can run in that
simulated hardware?
More than one instance of that operating system
run on the same hardware at the same time?
More than one differentoperating system canshare the same hardware at the same time?
Answer: Yes
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
3/18
Virtual Machines 3 Silbershatz, Galvin, Gagne
CS502 Spring 2006
SolutionVirtual Machine
A virtual machine provides interfaceidentical to underlying bare hardwareI.e., all devices, interrupts, memory, page
tables, etc.
Virtual Machine Operating Systemcreates illusion of multiple processors
Each capable of executing independently
No sharing, except via network protocols
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
4/18
Virtual Machines 4 Silbershatz, Galvin, Gagne
CS502 Spring 2006
HistoryCP67 / CMS
IBM Cambridge Scientific Center
Ran on IBM 360/67 Alternative to TSS/360, which never sold very well
Replicated hardware in each process Virtual 360/67 processor
Virtual disk(s), virtual console, printer, card reader, etc.
CMS: CambridgeMonitor System
A single user, interactive operating system
Commercialized as VM370 in mid-1970s
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
5/18
Virtual Machines 5 Silbershatz, Galvin, Gagne
CS502 Spring 2006
History (continued)
Various other attempts with other machines
VMwareWorkstation
Servers (for IT centers)
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
6/18
Virtual Machines 6 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Virtual Machines (continued)
The resources of the physical computer are
shared to create the virtual machines
CPU scheduling can create the appearance that
each user has own processor
Spooling and a file system provide
virtual card readers, virtual line printers
Disk partitioned to provide virtual disksA normal user time-sharing terminal serves as
the virtual machine operators console
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
7/18
Virtual Machines 7 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Virtual Machines (continued)
Non-virtual Machine Virtual Machine
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
8/18
Virtual Machines 8 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Definitions
Host Operating System:
The operating system actually running on the
hardware
Together with virtualization layer, it simulatesenvironment for
Guest Operating System:
The operating system running in the simulatedenvironment
E.g., the one we are trying to debug
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
9/18
Virtual Machines 9 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Virtual Machines (continued)
Virtual-machine concept provides complete protection ofsystem resources Each virtual machine is isolated from all other virtual machines.
However, no direct sharing of resources
Virtual-machine system is a good vehicle for operating-systems research and development. System development is done on the virtual machine does not
disrupt normal operation
Multiple concurrent developers can work at same time
The virtual machine concept is difficult to implement dueto the effort required to provide an exact duplicate to thesimulated machine
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
10/18
Virtual Machines 10 Silbershatz, Galvin, Gagne
CS502 Spring 2006
ExamplePage tables
Suppose guest OS has its own page tables Then
virtualization layermust
Copy those tables to its own
Trap every reference or update to tables and simulate it During page fault
Virtualization layermust decide whether fault belongs
to guest OS or self
Ifguest OS, must simulate a page fault
Likewise, virtualization layermust trap and
simulate every privileged instruction in machine!
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
11/18
Virtual Machines 11 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Virtual Machines (continued)
Some hardware architectures or features are
impossible to virtualize
Certain registers or state not exposed
Unusual devices and device control
Clocks, time, and real-time behavior
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
12/18
Virtual Machines 12 Silbershatz, Galvin, Gagne
CS502 Spring 2006
VMwareModern Virtual Machine System
Founded 1998, Mendel Rosenblum et al. Research at Stanford University
VMware Workstation SeparatesHost OS from virtualization layer
Host OS may be Windows, Linux, etc.
Wide variety of Guest operating systems
< $200
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
13/18
Virtual Machines 13 Silbershatz, Galvin, Gagne
CS502 Spring 2006
VMware Architecture
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
14/18
Virtual Machines 14 Silbershatz, Galvin, Gagne
CS502 Spring 2006
VMware Server
Free version released in 2006 http://www.vmware.com/products/server/
Runs on any x86 server hardware and OS
Windows Server and Linux Host OSs
Partition a physical server into multiple virtual
server machines Target marketIT centers providing multiple services
Allows separate virtual servers to be separately configured for
separate IT applications
Provisioning
Portability, replication, etc.
http://www.vmware.com/products/server/http://www.vmware.com/products/server/ -
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
15/18
Virtual Machines 15 Silbershatz, Galvin, Gagne
CS502 Spring 2006
VMware Server ESX
Total decoupling between hardware and
applications
High-end, high-performance IT applications Oracle, SQL Server, Microsoft Exchange server,
SAP, Siebel, Lotus Notes, BEA WebLogic, Apache
Dynamically move running application to
different hardware Maintenance, hardware replacement
Provisioning new versions, etc.
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
16/18
Virtual Machines 16 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Must virtual machine be replica of
host machine?
No, virtualization layercan simulate any
architecture Typically used for debugging specialized systems
Real-time systems, niche products, etc.
Guest architecture does not even have to be
real hardware!
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
17/18
Virtual Machines 17 Silbershatz, Galvin, Gagne
CS502 Spring 2006
The Java Virtual Machine
Own idealized architecture
Stylized machine language Byte codes
Readily available interpreter
-
8/2/2019 Wk 13 -- Virtual Machine Systems (1)
18/18
Virtual Machines 18 Silbershatz, Galvin, Gagne
CS502 Spring 2006
Break