Course Outline

Systems 2: Software Architecture and Design-From virtual machines to compilers

Professor Dr K Darcy Otto
Title Systems 2: Software Architecture and Design
Code CS 4382
Credits 4
Term Fall 2024
Times Mon/Thurs 13h40-15h30
Location Dickinson 117
Delivery Fully in-person
Contact Email
Office Hours Mon/Thurs 15h30–16h30, or by appointment

Description

Have you ever wondered what a computer is and how it actually works? In this course, we’ll answer the software half of this question. We will start with virtual machines and develop a high-level language, write a compiler, and an operating system. By the end, we will have developed a software hierarchy that makes the hardware we designed in Systems 1 useable.

We will begin by developing a virtual machine, an important layer that allows software to operate without considering the specifics of the underlying hardware. Then, we will develop a high-level programming language, designed to be both powerful and user-friendly (reminiscent of Java). And finally we will design and implement a compiler that translates human-readable code into a structured format that the virtual machine understands.

Our exploration of the software hierarchy will culminate in developing a simple operating system, the ultimate orchestrator of hardware and software resources. Our operating system will manage tasks such as executing programs, memory access, and input/output operations, making the computer you have developed effective for a wide variety of tasks.

By the end of the course, you will have a comprehensive understanding of the software stack that powers modern computer systems. You will also gain hands-on experience in developing the components that enable computers to perform complex tasks, from running applications to managing system resources. This course will also equip you with the knowledge and skills to bridge the gap between raw hardware and the high-level applications that we interact with daily, completing your journey from circuits to a fully operational modern computer.

Learning Objectives

  1. Design and implement a virtual machine, and understand its role in abstracting hardware complexity and facilitating software execution.
  2. Develop a high-level language, and gain insight into language design principles and their impact on software development.
  3. Understand the fundamentals of compiler design, focussing on syntax analysis and translating high-level programs into machine-readable code.
  4. Develop a simple operating system, and understand its core function in managing hardware resources and in application execution.
  5. Enhance the ability to translate abstract concepts into concrete design, bridging the gap between theoretical understanding and practical application.

An overarching objective of this course is to help you develop as a student of the liberal arts. True students of the liberal arts are able to reflect on the context in which they live, and reason about what it means to live a meaningful and happy life. Thus, they are able to be more than just children of their own time. But this means we must be willing to put our ideas to the test, see our own errors, and develop intellectual courage and humility. It also helps not to take ourselves too seriously.

Readings

  • Nisan, Noam and Shimon Schocken. The Elements of Computing Systems: Building a Modern Computer from First Principles, 2nd ed. Cambridge: The MIT Press, 2021. Available in the Dickinson reading room and Crosset Library.

Evaluation

You may chose either Option A or Option B for a grading scheme. Option B adds a final project, and reduces the weight of the course meetings and oral examination.

Option A

Check-in Meetings 50% Exercises
Oral Examination 50% Comprehensive

Option B

Check-in Meetings 30% Exercises
Oral Examination 40% Comprehensive
Final Project 30% Subject to approval
  • Check-in Meetings: Several times during the term, you will meet me during office hours. I will ask you to show me your work from class, and you should be prepared to demonstrate and explain your exercise answers, as well as answer questions about concepts from the course.

  • Examination: The examination is comprehensive and will be a series of oral questions, related to the topics covered in the course.

  • Final Project: If you choose Option B, you will propose and complete a group project in coördination with the professor. A proposal must be approved in order to submit your final project.

  1. Class Schedule: Current schedule of readings and assignments
  2. Check-in Schedule: Editable spreadsheet
  3. Electronic Whiteboard: For information sharing during class
  4. Assembler in Clojure: Solution to the Assembler exercise
  5. VM1 in Clojure: Solution to the simple VM exercise
  6. VM2 in Clojure: Solution to the full VM exercise
  7. BASIC Computer Games: Classic game listings in vintage BASIC
  8. From NAND to Tetris: Website corresponding to our text
  9. Lectures on From NAND to Tetris: by Noam and Schocken, authors of our text
  10. From NAND to Tetris Software Suite: Software used by our course (also available in CatLab)
  11. OpenJDK: May be needed to run Software Suite

Additional Information

  1. This course outline is subject to arbitrary change. I shall announce any changes in class; if you are not present, you are still responsible for finding out what I announce.
  2. Late exercises or assignments will not be accepted without an acceptable medical or compassionate reason. Exercises or assignments are due according to deadlines articulated in class.
  3. You must attend classes regularly and on-time. Penalties for unexcused absences and for lateness will factor into the class grade. Three unexcused absences are grounds for a marginal pass, and four are grounds for failure, even if all your other work is good. Excused absences do not count towards these totals.
  4. The use of notebook computers or mobile devices is not permitted during class, except as explicitly allowed by the professor to do work directly related to some activity in class. You are expected to use analogue technologies (e.g., pencil and paper) to take notes, unless you have a special dispensation to use digital devices in class.
  5. The use of artificial intelligence in coursework is not permitted, except as explicitly allowed by the professor. You must fully cite your use of artificial intelligence if you use it.
  6. Office hours are first-come-first-serve, unless you have an appointment. If you request an appointment by email, please send me a selection of several times you are available.
  7. Please be aware of the college policies on class attendance, as well as academic and artistic ethics. You must declare any work you submit that is generated in part or whole by AI.
  8. If you are being graded, your mark in the course will be translated into a letter-grade, according to the following scale: A+ (90–100), A (85–89), A– (80–84), B+ (77–79), B (73–76), B– (70–72), C+ (67–69), C (63–66), C– (60–62), D (50–59), F (0–49). Your grade will not be otherwise curved or adjusted.