CS 595: Virtual Machines

Staff

Instructor: Kyle C. Hale
  Office Hours: Tues. 11AM-1PM, Wed. 4:30PM-5:30PM (SB 237F)
  E-mail: khale [at] cs [dot] iit [dot] edu

Course Info

Course number: CS 595-02

Semester: Fall 2017

Lecture Time: Mod/Wed 3:15PM - 4:30PM

Lecture Location: Engineering Center 027

Overview

Virtual machines have transformed the ways in which we build, manage, and interact with modern computer systems. A great deal of the network packets that you send as you sit at your computer are handled by virtual machines that may move to another side of the world in a matter of hours. If you have an Android phone, every application you launch executes in a virtual machine. Have you written a Java or Python program lately? It couldn't run without a virtual machine sitting underneath it. VMs have enabled new development practices for production applications, mobile applications, web applications, and operating system kernels. They allow datacenter operators to more efficiently provision hardware resources, saving money and energy. They allow service providers to quickly react to failures in an efficient and clean way. They enable the construction of portable and platform-agnostic programming languages by decoupling applications from the hardware on which they run. While VMs have been around since the early 1970s, modern developments, from cloudlets to containers, are only increasing the utility of virtualization technologies. One can expect that their importance and relevance will only increase.

This means that a basic understanding of the technological foundations underlying virtual machines should be part of any computer scientist's repertoire. This course will draw back the curtains and expose the magic that makes various types of VMs work. By the end of the course, you will have a deep understanding of hypervisors, system virtualization, machine emulation, language virtual machines, binary translators, virtual resource management, and more. You will gain exposure to a real-world hypervisor code-base. Furthermore, you will actually build a virtual machine and develop an intuition for using VMs to solve problems. The course will involve lectures, written assignments, involved programming projects, and discussions of foundational research papers.

Course Goals

The goals fo this course will be for you to develop a deep understanding of various types of virtualization techniques, their advantages and disadvantage, and to be able to apply them in a practical setting. You will be able to build basic VM constructs and understand how to evaluate them. You will therefore be expected to strengthen your system programming skills. You will also learn about new and upcoming technologies related to virtualization.

In general, you will learn about the following topics (and potentially others):

Communication

We will be primarily using Piazza as a course communication mechanism. If you have an issue or question that is not strictly private (especially one you think would benefit everyone were it answered), please use Piazza as your first resource. The instructor and your fellow classmates will be there to help. Note that you can also post anonymously if you so choose.

Lecture Schedule

Week Date Item Topic Notes Reading
1 Mon 8/21 Lec 1 Class logistics; intro to VMs Required reading: SN Ch. 1
1 Wed 8/23 Lec 2 Computer Architecture review Lec. 2 notes
2 Mon 8/28 Lec 3 Control flow; MOS 6502 Architecture/ISA Lec. 3 notes Required reading: SN Ch. 2
2 Wed 8/30 Lec 4 Introduction to Hawknest system architecture; Project overview Project 1 Preliminary Posted
3 Mon 9/4 holiday Labor Day: No class
3 Wed 9/6 Lec 5 TBD
4 Mon 9/11 Lec 6 Hawknest code walkthrough, implementation and emulation strategies
4 Wed 9/13 Lec 7 Emulation Techniques, Binary Translation
5 Mon 9/18 Lec 8 QEMU code walk
5 Wed 9/20 Lec 9 Introduction to HLL VMs
6 Mon 9/25 Lec 10 No Class
6 Wed 9/27 Lec 11 HLL VM Impl. overview Required Reading: S&N Ch. 5
7 Mon 10/2 Lec 12 Garbage Collection
7 Wed 10/4 Lec 13 TBD
8 Mon 10/9 holiday Fall Break Day: No class
8 Wed 10/11 Lec 14 Project 1 Presentations
9 Mon 10/16 Lec 15 Full System Virtualization Overview
9 Wed 10/18 Lec 16 Virtual Memory Review QEMU homework out. Due 10/26
10 Mon 10/23 Lec 17 Virtual Memory and Paging
10 Wed 10/25 Lec 18 Paging Contd.
11 Mon 10/30 Lec 19 Nested/Shadow Paging
11 Wed 11/1 Lec 20 Intro to I/O and Interrupt Virtualization Required reading: Rosenblum on I/O Virtualization.
Read AMD System's Programming Manual Ch. 5
12 Mon 11/6 Lec 21 Palacios VMM overview
12 Wed 11/8 Lec 22 Hawkbeans JVM overview and code walkthrough
13 Mon 11/13 No Class Instructor gone for conference
13 Wed 11/15 No Class Instructor gone for conference
14 Mon 11/20 Lec 23 Palacios code walkthrough; Network virtualization; overlays; SDN
14 Wed 11/22 holiday Thanksgiving Break: No class
15 Mon 11/27 Lec 24 Virtual timekeeping, scheduling, etc.
15 Wed 11/29 Lec 25 Performance optimizations: live migration, memory ballooning, APIC virt, self-virtualizing devices Reading: Original paper on live migration
16 Mon 12/4 Lec 26 Current and Future Directions I Reading: Side channel attacks in the cloud
Reading: Blue Pill Virtualization attack
16 Wed 12/6 Lec 27 Current and Future Directions II Note: since this is during exam week, schedule may change

Projects

Project Topic Due Date Handout Notes (TBP = To Be Posted)
1 System Emulation Part 1 Posted 8/30, due next Wednesday (9/6)
Full Project Posted 9/12, due 10/13 11:59PM
2 Language Virtual Machines Hawkbeans, due Wed. 12/6 at 11:59PM

Books

The following book is the only required textbook for this course. If you plan on pursuing computer systems seriously, it is a great book to have as a reference:

Virtual Machines: Versatile Platforms for Systems and Processes (1st Edition), by Jim Smith and Ravi Nair, 2005 Morgan Kaufmann.

Development Environment

TBD

Other Useful Links and Resources

This is a list of other resources that you might find useful for this class and for doing work in the systems area in general. Feel free to peruse them at your own convenience.

Links