1 of 36

ECS 251: Operating systems

When virtual is better than real

2 of 36

Notes

Piazza: there are two UC Davis entries, you have to pick the right one to find 251

Class size: looking into larger room, no promises though

Quizzes and grade update: updated website, one free quiz

Office hours posted, Wednesdays from 3:10pm - 4pm in my office (3061 Kemper)

3 of 36

Administrative

Can sign up for presentations on the google doc now

  • First lecture available is 1/23 (Nested Kernels paper)
  • Extra credit to anyone who signs up to lead the discussion on 1/23 or 1/25

4 of 36

Administrative

Office hours set: Wednesdays 3:10pm - 4pm

5 of 36

Administrative

Start thinking about your project groups now (we’ll talk more about proposals later)

  • Requirements 2-3 students. Can do 4, but there is lots of overhead then
  • Suggestions / hopes
    • At least 1 PhD student per team
    • At least 1 MS student per team
  • Welcome to work on your own research, feel free to drop by or send email for feedback

6 of 36

Discussion questions

One of the most important parts of your presentation

Three default questions:

  • What did you like about the paper?
  • What did you dislike about the paper?
  • What future work did this inspire?

Other questions designed to spark a discussion

  • Most papers are accepted / rejected based on opinions, rarely because of facts
  • This class will hopefully help you learn how your classmates think

7 of 36

Quote

“Intelligent and polite disagreement is what separates us from the politicians”

-- Matt Hicks, Advanced OS alum and current professor

How to read a paper...

8 of 36

Overview for lecture

Reminder, I’m doing both the “administrative” part and the discussion leading part

  • Description of a VMM
  • Why we read these papers
  • Deterministic replay
  • Small group discussions
  • Class-wide discussions

9 of 36

VMM basics

Definitions

  • VM -- software abstraction of a real machine
    • Guest software -- anything running inside of a VM
  • VMM -- “thin” layer of software
    • Host software / resources are the VMM and below
      • Eg host physical memory
    • Manages resources
    • Provides abstractions
  • How is this different than an operating system?
  • Examples?

10 of 36

VMM architecture

11 of 36

Workshop papers

No real implementation

Lots of ideas

Potential for impact

12 of 36

When virtual is better than real

Pete Chen’s most cited work

One of the two main reasons why VMs were such a popular research topic

  • The other is Stanford work on making VMMs practical for x86
  • Very deep technical innovations to do this for legacy x86 processors

13 of 36

Lots of impact (academic and beyond)

Secure logging / ReVirt

  • 5+ papers, 2 commercial products, 3+ PhDs (including mine), running in VMware

Intrusion detection

  • Tons of papers, sandboxing email, servers, etc

Migration

  • 3+ papers, a company (Moka5), Intel Internet suspend / resume
  • Used heavily in cloud infrastructure

14 of 36

VMMs in general

Used heavily in data centers

Shipped with Windows 7 by default for Windows XP mode

Used to debug Android apps (the Android simulator uses the qemu VMM)

15 of 36

This is where my “historical context” would have ended

16 of 36

Key points

VMMs are great for certain things

VMMs are not the solution to all problems (like we thought they were in ‘01)

17 of 36

Using VMMs for services

Benefits

  • Modify the hardware layer
  • Simple abstractions to work with
    • Not always true, but sometimes true (e.g., checkpoints)
  • Improved isolation
    • Should have been done by OSes of the time, but done poorly
    • It turns out that mobile OSes might have gotten this right
    • I’m going to teach an entire class on this next quarter!

Uses

  • Clouds, secure logging, intrusion detection, debugging Android apps

18 of 36

Poor uses of VMMs

Need to peer into the guest system (e.g., the Semantic Gap)

E.g., debugging a guest process from outside of the VM

19 of 36

Secure logging -- deterministic replay

Use “time-travel” to recreate the past

Architecturally visible state transitions

  • Same starting state + same input => same state
  • E.g., “Hello world”
  • E.g., “Hello world, it’s 5:00pm”
  • In general, need to log sources of non-determinism, re-execute the rest

20 of 36

ReVirt

Uses VMM to record virtual machine

Most computation is deterministic

Non-determinism -- I/O, interrupts

  • Log these values
  • Use performance counters

Uniprocessor only

21 of 36

Can also replay a process

22 of 36

Inject inputs back into process to replay

23 of 36

Software-only replay

Advantages

  • Simple and efficient
  • Closer to abstractions you care about
  • Multi-thread on a single core

Disadvantages

  • Multi-thread on multi-core

24 of 36

Problem: race conditions

25 of 36

26 of 36

27 of 36

28 of 36

29 of 36

30 of 36

31 of 36

The final state depends on the interleaving of the two processors memory access

32 of 36

Problem: race conditions

Software-only approach would have to inspect all load and store instructions

  • Some optimizations to improve this
  • Still ongoing research

33 of 36

Alternative: Delorean: H/W support for multi core replay

34 of 36

Downside: records entire system

35 of 36

Capo: combines HW and SW replay systems

36 of 36

What did you like about the paper?

• What did you dislike about the paper?

• What future work did this inspire?

Can you create a complete VMM log from

within the guest (or non-virtual) OS?

• Will VMMs become the next OS?

• Is smaller more secure?

• Are VMMs more secure than OSes?

• Are extra layers on computer systems good?

• What will it take to make replay practical?

• Are we going to have HW support for replay?