Michael Yoo

Advanced Operating Systems Notes

These are some notes I took while I was taking the Advanced Operating Systems (COMP9242 19T2) at UNSW. Since the lectures cover a variety of somewhat obscure topics, I’m posting them here so I don’t forget about them later on in my career!

Disclaimer: These notes are my own, and they may not fully appreciate the intention of the lecturers or the contents of the course.

The lecture slides are Creative Commons, and they are available here: https://www.cse.unsw.edu.au/~cs9242/19/lectures.shtml


Lecture Week 1 Monday

“Introduction”

Capabilities

CSpace and CNodes

IPC (Endpoints)

Badges

Virtual Registers

Notifications


Lecture Week 1 Tuesday


Lecture Week 2 Tuesday

“Operating System Execution Models”

Note: Week 2 Monday was a public holiday

Interrupt Handling

Execution Models, Threads, Coroutines

Per-Thread Kernel Stack

Single Kernel Stack


Lecture Week 3 Monday

“Events and Threads”

Two competing papers to guide us to choose which model to use for our own OS project.

Why Threads Are A Bad Idea

(for most purposes)

Why Events Are A Bad Idea

(for high-concurrency servers)


Lecture Week 3 Tuesday

“Caches”

Cache Indexing

Cache Misses

Cache Addressing Schemes

Cache Issues

Write Buffer

Translation Lookaside Buffer


Lecture Week 4 Monday

“Virtualisation”

Virtual Machine

Types of Virtualisation

Why VMs?

Virtualisation Mechanics

Virtualisation Address Translation

Guest Self-Virtualisation

Device Models

ARM Virtualisation Extensions

World Switch

KVM

Fun Things with VMs


Lecture Week 4 Tuesday

“Measuring and Analysing Performance”

Benchmarking in R&D

Profiling

Performance Analysis

Understanding Performance


Lecture Week 5 Monday

“Real-Time Systems”

Real-Time Tasks

Weakly-Hard Real

Firm Real-Time Systems

Soft Real-Time

Best-Effort

What does it mean for OS?

On-Line RT Scheduling

Resource Sharing

Scheduling Overloaded RT Systems

Mixed-Criticality Systems


Lecture Week 5 Tuesday

“Microkernel Design & Implementation”

“If you find yourself hand waving a lot this is a sure sign you’re missing a diagram” – Gernot

“Security is no excuse for bad performance” – Gernot

Traditional L4 and seL4 Improvements

Reflecting on Changes


Lecture Week 6 Monday

“Security Fundamentals”

Security Design

Mechanisms & Policies

Risk Management

Covert Channels

Access-Control Principles

Differences of ACLs and Capabilities

Mandatory vs Discretionary Access Control


Lecture Week 6 Tuesday

“Security: Information Leakage”

Causes of Timing Channels

Timing Channels

Evaluating Intra-Core Channels

Intel Spectre Defences

Speculating Disaster

Meltdown

Spectre: Branch Prediction (Variant 1)


Lecture Week 7 Monday

“Linux, Locking, Many Processors”

(No lecture Week 7 Tuesday)

Some History

Scheduling

Memory Management

Driver interface

Containers

Scalability


Lecture Week 8 Monday

“Multicore and Memory Ordering”

Types of Multiprocessors

Memory Ordering

Kernel Locking


Lecture Week 8 Tuesday

Continued…


Lecture Week 9 Monday

“Formal Verification and seL4”

Assurance and Verification

Formal Verification

Model Checking and Linux: A Sad Story

Story of seL4

Security Properties of seL4

Verification Assumptions


Lecture Week 9 Tuesday

“Local OS Research”

“Use of a monolithic OS in security- or safety-critical scenarios is professional malpractice!” – Gernot

Quantifying OS Design Security Impact

Cogent

Time Protection

Hardware Redundancy / Lockstep

Real World Use


Lecture Week 10 Monday

“Multiprocessor OS”

Scalability

Multiprocessor Hardware

Optimisation for Scalability

OS Design Guidelines for MP

Approaches for MP

Space-Time Partitioning

K42: Clustered Objects

Corey / Linux Brute Force

FlexSC

Barrelfish