Virtualization Concepts, Explained

UPI Study › Courses › Introduction to Operating Systems › Free lessons › Lesson 10.1 Free with a free account

Virtualization Concepts

Introduction to Operating Systems · Chapter 10: Virtualization and Virtual MachinesSection 10.1 · lesson 78 of 838 min · free with a free account

← Antivirus SoftwareNext lesson: The Benefits of Virtualization →

A free account plays all of Chapter 1 and 3 more lessons of Introduction to Operating Systems. Create a free account →

Earn 3 college credits for Introduction to Operating SystemsRecommended for credit by NCCRS · Computer Science 354 · self-paced · one payment, lifetime access

In this lesson

How one physical computer runs several complete virtual machines.

  • Define host, guest, hypervisor, and virtual hardware
  • Explain why a virtual machine is not a fake or a recording
  • State Popek and Goldberg's three tests for a hypervisor
  • Distinguish a hypervisor from an emulator

Free study notes

Get this lesson's notes by email

The key points and 4 practice questions with answers, in your inbox. One email, free.

One email. Unsubscribe in one click.

Transcript

Everything said in the video, section by section (1,103 words). Read along, or search it.

Opening Story

A Second Computer Inside a Window

Sam, who runs a small online bakery from an old laptop, wants to try a different operating system, without wiping anything. Ivy, who looks after the computers at a school, has a simple answer: just run it inside a window. A whole second computer, with its own desktop, its own files, and its own programs, living in a window on the first one. It sounds like a magic trick, or a fake. It's neither. It's called virtualization, and it quietly runs a huge part of the internet.

Analogy

An Apartment Building of Computers

Think of an apartment building. One roof, one set of water pipes, one electric supply, and one building manager. Yet each family has its own flat, with its own front door and furniture. The family in flat 2 can't see into flat 3. And if one family floods its kitchen, the others stay dry. Virtualization does the same thing to a computer. It lets one physical machine act like several separate computers at once. Each one is a virtual machine, or VM: a complete computer made of software, with its own operating system, programs, and files.

Key Terms

Host, Guest, Hypervisor, Virtual Hardware

Four words come up in every talk about virtualization. Learn them now, and the rest of this chapter gets easy. The host is the real physical computer, plus the software that shares it out. In the last column, that's the whole building. A guest is a virtual machine and the operating system running inside it: one family in one flat. The hypervisor, also called a virtual machine monitor, creates the VMs, hands them resources, and keeps them apart. It's the building manager. And virtual hardware is the pretend processor, memory, disk, and network card that a guest believes it owns: the kitchen in each flat.

How It Works

The Hypervisor Sits in the Middle

The hypervisor sits between the real hardware and the VMs. When a guest asks for memory, the hypervisor picks a slice of the real memory. When a guest writes to its disk, the hypervisor writes into a file on the real disk. The guest never notices, because its virtual hardware looks just like the real thing. So a guest is usually an ordinary, unmodified operating system: Windows, Linux, or another. It has no idea it isn't alone. It boots, as in lesson 1.9, schedules its own processes, and manages its own memory, all on hardware that is partly an illusion.

Common Mistake

A Virtual Machine Is No Recording

Many people think a VM is a movie of a computer, a pretend program that only looks like one. It isn't. The guest's instructions really run on the real processor. And its files really take up space on the real disk. What's pretend is only the view: the guest thinks it owns the whole machine.

Formal Definition

Popek and Goldberg's Three Tests

In 1974, Gerald Popek and Robert Goldberg put it in one line: a virtual machine is an efficient, isolated duplicate of the real machine. They gave three tests for a true hypervisor. First, programs behave just as they would on the real machine. Second, most instructions run directly on the real processor, at full speed. Third, the hypervisor stays in control of every resource, so no guest can take what isn't its own.

Quick Check

Counting Operating Systems on One Laptop

Quick check. Ivy's school laptop runs Windows. On it, a hypervisor program runs two Linux guests, side by side. How many operating systems are running on that laptop right now, each one scheduling its own processes? Pause, and decide. Three. Windows is still running underneath: it's part of the host, the real computer plus the software that shares it out. And each Linux guest is a complete operating system. It boots, schedules its own processes, and manages its own memory. Picking one is the movie mistake: the guests are real systems, not pictures. And two forgets the host's own system underneath.

Layer Diagram

A New Layer Under Several Stacks

Now the layers. In lesson 1.4 you drew a computer as a stack: hardware at the bottom, the operating system above it, applications on top. Virtualization adds one new layer. The bottom is still the real hardware, but now the hypervisor owns it. Above the hypervisor sit several separate stacks. Each has its own virtual hardware, its own guest system, and its own applications. The guest system no longer touches the real hardware. It talks to virtual hardware, and the hypervisor translates. Each layer hides the details of the one below. And a crash or a virus in one stack stays in that stack, like a flooded kitchen in one flat.

Resource Sharing

Processor Time, Memory, and Devices

A building has limited pipes. A computer has limited memory and processor time. So the hypervisor must share them out fairly, in three ways. Processor time. Like the scheduler of lesson 2.6, the hypervisor gives each guest turns on the real processor cores. Memory. Each guest gets a private block of the real memory, and no guest may peek into another's block. Lessons 4.6 and 9.7 explain why such walls matter. Devices. Disks and network cards are shared out as files and virtual cables. Lesson 10.4 shows how.

Quick Check

Why an Emulator Is Not a Hypervisor

Quick check. A program on Ivy's laptop plays an old game console's games. It reads each console instruction, and imitates it in software. The console's processor is a different kind from the laptop's. Which of Popek and Goldberg's three tests does this program fail? Pause, and decide. Most instructions run directly. Here, none do: every console instruction is translated in software, which is slow. It can still behave like the console, and stay in control. That's an emulator, not a hypervisor. A VM is fast because the guest and the host speak the same processor language. So most guest instructions simply run on the real processor.

Everyday Uses

Where Virtualization Hides

You've probably used virtualization without noticing. Here are four places it hides. Rent a small server from a hosting company, and you usually get a VM, not a whole machine. Ivy keeps a clean Linux VM for each class, so a student's mistake can't damage the lab computers. A developer can test a program on three operating systems without owning three computers. And an old program can live on, inside a VM running its old system.

Story Ending

A Guest in Its Own Flat

Back to Sam, who worried that trying a new system would break the bakery's order spreadsheet. It lives in its own flat, Ivy said. The guest has its own disk file. Delete the whole guest, and your real files never notice. Sam grinned, and clicked Start.

Key Takeaways

Hosts, Guests, and Hypervisors Reviewed

To recap. Virtualization lets one physical computer act like several separate ones, called virtual machines. The host is the real computer, and the guests are the VMs. The hypervisor creates them and keeps them apart, behind virtual hardware. A VM isn't fake: its instructions run on the real processor. And the hypervisor shares out processor time, memory, and devices.

About Introduction to Operating Systems at UPI Study

Introduction to Operating Systems (Computer Science 354) is a self-paced online course of 83 video lessons in 10 chapters, from what an operating system does and process scheduling to concurrency, memory, devices, file systems, networks, the internet, security and virtual machines. It carries a NCCRS credit recommendation for 3 semester credits.

Every lesson transcript is free on pages like this one, and the videos are free with a free UPI Study account. Enrolling adds a practice quiz after each lesson, the graded work and final exam that earn the credit, lifetime access, and an official transcript on completion. UPI Study has helped over 130,000 students with college credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Compare: Linux vs Operating Systems

Why take it here

Why students take Introduction to Operating Systems with UPI Study

What happens under every app you runIntroduction to Operating Systems explains the software that runs a computer: processes and scheduling, threads and synchronization, deadlock, memory and paging, devices and storage, file systems, networking, security and virtualization. It suits computer science and information technology degrees.
Credit at a fraction of the priceThe same 3 credits can cost $750 or more at a US college. Here it is one payment, self-paced, with lifetime access.
Finish your degree soonerTransfer credits reduce the courses you still owe, so you can graduate earlier or lighten a heavy semester.
Strengthen an applicationA completed college-level course on an official transcript shows admissions and scholarship committees you can do the work.
Study on your own scheduleNo start dates, no deadlines. Watch the lessons, practice, and take the final when you are ready.
130,000+students helped with college creditsACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Where the credit goes

Universities that work with NCCRS

Introduction to Operating Systems carries a NCCRS credit recommendation. These universities work with NCCRS; some are UPI Study's signed partners. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.

Find my college → Not listed? Ask Athena in the corner of this page, or book a 15-minute call.

FAQ

Questions students ask us

About Virtualization Concepts

What is a hypervisor?
A hypervisor, also called a virtual machine monitor, is the software that creates virtual machines, hands them resources, and keeps them apart. It sits between the real hardware and the guests. When a guest asks for memory, the hypervisor gives it a slice of real memory, and when a guest writes to its disk, the hypervisor writes into a file on the real disk.
What is the difference between a host and a guest in virtualization?
The host is the real physical computer plus the software that shares it out, while a guest is a virtual machine and the operating system running inside it. One host can run several guests at once. Each guest is usually an ordinary, unmodified operating system that boots, schedules its own processes, and manages its own memory without knowing it shares the hardware.
What are Popek and Goldberg's requirements for virtualization?
In 1974, Gerald Popek and Robert Goldberg described a virtual machine as an efficient, isolated duplicate of the real machine and gave three tests for a true hypervisor. Programs must behave just as they would on the real machine. Most instructions must run directly on the real processor at full speed. And the hypervisor must stay in control of every resource, so no guest takes what is not its own.
What is the difference between an emulator and a virtual machine?
An emulator imitates every instruction in software, often for a different kind of processor, while a virtual machine runs most guest instructions directly on the real processor. A game console emulator translates every console instruction, which is slow, so it fails Popek and Goldberg's test that most instructions run directly. A virtual machine is fast because the guest and host speak the same processor language, and only sensitive instructions need the hypervisor.

About the Introduction to Operating Systems course

How many college credits is Introduction to Operating Systems?
Introduction to Operating Systems (Computer Science 354) carries a NCCRS credit recommendation for 3 semester credits. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities.
How much does Introduction to Operating Systems cost and what is included?
$250, paid once, with lifetime access: all 83 video lessons, a practice quiz after each, the graded work and final exam, and an official transcript when you finish. Students who want several courses choose UPI Study PRO instead.
Which universities accept UPI Study credits?
UPI Study has signed partner agreements with universities such as Thomas Edison State University, University of the People and Charter Oak State College, and works with universities such as Penn State, SNHU and SUNY. ACE and NCCRS have over 2,100 cooperating colleges that will consider accepting credits; the final decision is with the universities. Use "Find my college" on this page to check yours.
How long does Introduction to Operating Systems take?
It is self-paced with no deadlines. The 83 lessons total about 10 hours of video; most students add reading and practice time and finish in a few weeks to a few months, on their own schedule.
How are the exams done?
Quizzes and assignments are online in the course. The final exam is taken online with proctoring; a person on the UPI Study team checks assignments, usually within two days.
How do my credits reach my college?
When the course shows 100% complete, request the official transcript from your dashboard. It is sent to the college you name, and you can send it to more than one. Check your college first with "Find my college" on this page, or ask Athena.

Ready for the full course? Earn 3 credits in Introduction to Operating Systems.

83 video lessons, a quiz after each one, and the graded work that earns the credit. Recommended for credit by NCCRS.

Updated

Introduction to Operating Systems
3 credits · NCCRS
Enroll →