Slides
Videos
Gnashing about Gash
Weilin's most evil test:
curl "http://rust-class.org/pages/ps2.html" | sed "s/[^a-zA-Z ]/ /g" | tr "A-Z " "a-z\n"| grep "[a-z]" | sort -u
What is the difference between a background process and foreground process?
What happens when the user types Ctrl-C
?
Memory Isolation
How can a program be isolated in memory without hardware support?
Native Client - Native Client: A Sandbox for Portable, Untrusted x86 Native Code, IEEE Security and Privacy ("Oakland") 2009.
What are the advantages/disadvantages of hardware-based memory isolation over software-based memory isolation?
Implementing Virtual Memory
Robert C. Daley and Jack B. Dennis, Virtual Memory, Processes, and Sharing in MULTICS - Symposium on Operating System Principles (SOSP), 1967.
What must be done to switch processes on MULTICS?
Virtual Memory on the x86
Intel x86 Software Develop Manuals - Most of what I covered today is in Volume I, Chapter 3 (Basic Execution Environment) with Section 3.3 on Memory Organization. Chapter 5 is all about Protection.
Why is it useful to convert a logical address into a linear address, as is done by the segmentation unit?
Where is the Global Descriptor Table stored?
Why is a memory page in the 80386 (32-bit) processor 4K bytes?
What will this program do and why?
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
char *s = (char *) malloc (1);
int i = 0;
while (1) {
printf("%d: %x\n", i, s[i]);
i += 4;
}
}
Challenge: Write a program that takes N as an input and produces (nearly) exactly N page faults. A good solution is worth a USS Hopper patch (even cooler than a Rust sticker!) or an exemption from Exam 1 or Exam 2.
If you were designing a modern processor today, and not limited by the need to run legacy operating systems and programs, how would your memory isolation design be different from x86's virtual memory?
Growing a Language
Guy L. Steele's Growing a Language [Transcript]:
How well does the design of Rust espouse the philosophy of growing a language by Guy Steele in the talk?