Ancient CS 61 Content Warning!!!!!1!!!
This is not the current version of the class.
This site was automatically translated from a wiki. The translation may have introduced mistakes (and the content might have been wrong to begin with).

Lecture 12 Thoughts

Code examples

We’ve added all the OS01 code to the cs61/cs61-lectures.git repository. It is located in the os01 directory.

See the os01/README.md file for more information.

The file layout has changed from lecture, where code was in l12/os01. You will want to look at os01/kernel.c, os01/p-hello.c, and os01/p-welcome.c in the current file layout.

We ran through several versions of the OS01 example code in class, and have created branches in cs61-lectures.git so you can compare these versions. The branches are:

v01

The initial code.

v02

The p-hello process runs an infinite loop. This hangs the OS forever.

v03

The OS kernel adds a timer interrupt, which fixes the hang.

v04

The p-hello process evilly turns off the timer interrupt. The OS again hangs forever.

v05

The OS kernel disables interrupt manipulation in user processes. The attempt to turn off the interrupt becomes a fault.

v06

The OS catches the fault.

You can examine these branches in several ways.

We also added accessibility support to OS01. Try “make run-console”.