CS 17-770: Virtual Machines and Managed Runtimes
Instructor: Ben L. Titzer
Syllabus: here
Piazza: https://piazza.com/class/m06ykpnmt331by
Class time:
Tues & Thurs 9:30am - 10:50am
Teaching Assistant(s): Arjun Ramesh
Traditional compiler and programming language courses focus on language implementations that generate code statically (offline) for a target machine.
Yet in today's landscape, many programming languages run on virtual machines where either a virtual instruction set architecture (bytecode) or the source code of the program is translated (and optimized) dynamically for an underlying machine.
Such languages come with additional challenges beyond traditional compilation as taught in courses, including efficient representation of high-level language constructs and automatic memory management in the form of garbage collection.
Together, the components of the virtual machine and services form what is known as a managed runtime system.
This course focuses on implementation techniques for managed runtime systems.
Students will learn the basics of virtual machine implementation and build working prototypes to run actual programs.
Prior knowledge of compilers and some familiarity with programming language implementation is required.
Key topics
- code formats: bytecodes and source code
- loading and verifying code
- interpreters: execution of bytecode and/or IR
- runtime system: object, function, and class representations, inline caches
- memory management: allocators and automatic garbage collection
- dynamic compilers: baseline and optimizing JIT compilers
- comparative study of historical virtual machines
Recommended Reading
Lectures will not follow a particular textbook; instead refer to lecture notes made available here.
Some background is helpful from "Crafting Interpreters" by Robert Nystrom.
The course will include several readings for PhD students.
Lecture Notes
Assessment Structure
- 10 points - (due Sep 17, 9:00pm) Project 1
- 10 points - (due Oct 1, 9:00pm) Project 2
- 20 points - Midterm Exam (Oct 22 in-class)
- 0 points - (due Nov 6) Final Project Proposal
- 12 points - (due Nov 6, 9:00pm) Project 3A or Project 3B
- 13 points - (due Dec 13, 9:00pm) Final Project
- 25 points - Final Exam (Dec 9, 8:30 am, in-person)
- 10 points - (due Dec 16, 9:00pm) Engine report
Office Hours
- Ben Titzer: Tuesdays 1-2pm; Wednesdays 2-3pm; or by appointment
- Arjun Ramesh: Mondays 11am-12pm; Thursdays 12-1pm; or by appointment (Location: CIC 2313C)