References
All this material (and wording) is from Professor Dahlin's honors' operating system course at the University of Texas at Austin or Professor Kaashoek's operating systems engineering course at MIT. And is used with their permission.
General OS info
- Berkeley lectures
- iTunes link (especially the Fall 2008 video collection)
- Berkeley streaming link
General Tools
I assume that everyone in the class has reasonably strong programming skills and that you are comfortable using the basic tools of the trade (debuggers, makefiles, etc.) Here are some references if you need to brush up on any of these basic skills.
- make You should know how to use make!
- Version control (keeping track of old versions of software before you added the last bug) is essential for large software projects. CVS and SVN are sophisticated tools for allowing concurrent editing in a multi-programmer project.
- etags In this project, you will need to navigate a number of files, some of which were written by someone other than you. Etags (for emacs or ctags for vi) makes it easy to jump to where a function, type, or global variable is defined and will simplify your life.
- GDB and GDB reference card: If you currently debug with printf's, spend a couple hours learning GDB. It's not hard, and I promise you will save time in the long (or not-so-long) run. DDD is a graphical front end to GDB: http://www.gnu.org/software/ddd.
- Find an editor that makes it easy to open up multiple files and switch among them. Emacs, for example.
Background
- The Ethical Hacker website has a good introduction to assembly, using a debugger, and hands on reverse engineering (check out Introduction to Reverse Engineering parts 1 & 2)
- Understanding Code by Kwazy Webbit ( local copy) There is a good section on the relationship of assembly code to C.
C References
- The classic reference for C: The C programming language by Kernighan and Ritchie. Prentice Hall, Inc., 1988. ISBN 0-13-110362-8, 1998.
- The best introduction to C for people that know other languages that I know of is "ANSI C for Programmers on UNIX Systems" by Tim Love. (local .pdf copy)
- Chapter 3 "Reading C Programs" of Lions Commentary on the 6th Edition of the UNIX Operating System provides a quick (6 page) overview of C syntax, with a particular emphasis on some of the gnarley constructs OS writers sometimes like to use when they are feeling clever. Some of the dialect and style is a bit archaic, but making sure you understand these examples will save you much pain in the labs.
C++ References
- Tom Anderson's A Quick Introduction to C++ introduces a subset of C++ that can be "learned in a day." It is aimed at someone who knows C and wants to learn C++, but it should also be comprehensible for someone who knows Java and wants to learn C++.
Classic UNIX references
- Lions' Commentary on UNIX' 6th Edition, John Lions
- An on-line version of the Lions commentary, and the source code.
- The v6 source code is also available on-line through the PDP Unix Preservation Society.
- The UNIX Time-Sharing System, Dennis M. Ritchie and Ken L.Thompson,. Bell System Technical Journal 57, number 6, part 2 (July-August 1978) pages 1905-1930.
- The Evolution of the Unix Time-sharing System, Dennis M. Ritchie, 1979.
x86 Emulation
- Bochs - An x86 platform and CPU emulator.
- User manual
- Debugger reference
- Notes on setting up the tools for this class
- A big advantage you will have over last year's class: I finally managed to get GDB working with bochs. In the CS department, run /u/dahlin/bin/bochs-gdb (instead of /lusr/opt/bochs-2.1.1/bochs) and see this description on how to attach GDB to your bochs process.
- QEMU - A new, much faster but less mature PC emulator. Use in CS372 at your own risk.
x86 Assembly Language
- PC Assembly Language. Paul Carter, November 2003. (Local Copy)
- Intel 80386 Programmer's Reference Manual, 1987 (HTML) (local copy - HTML) (local copy - tar.gz) Much shorter than the full current Intel Architecture manuals below, but describes all processor features used in 6.828.
- IA-32 Intel Architecture Software Developer's Manuals, Intel, 2004. Local copies:
- AMD64 Architecture Programmer's Manual. Covers both the "classic" 32-bit x86 architecture and the new 64-bit extensions supported by the latest AMD and Intel processors.
- Writing inline assembly language with GCC:
- Brennan's Guide to Inline Assembly, Brennan "Mr. Wacko" Underwood (local html copy)
- Inline assembly for x86 in Linux, Bharata B. Rao, IBM
- grayx86 Inline Assembly Programming, Anthony Aaby
- Loading x86 executables in the ELF format:
- Tool Interface Standard (TIS) Executable and Linking Format (ELF). The definitive standard for the ELF format.
PC Hardware Programming
- General PC architecture information
- General BIOS and PC bootstrap
- BIOS Central
- BIOS Services and Software Interrupts, Roger Morgan, 1997.
- "El Torito" Bootable CD-ROM Format Specification, Phoenix/IBM, January 1995. (local copy)
- VGA display -
kern/console.c- VESA BIOS Extension (VBE) 3.0, Video Electronics Standards Association, September 1998.
- VGADOC, Finn Thøgersen, 2000. (local copy - ZIP)
- Free VGA Project, J.D. Neal, 1998.
- Keyboard and Mouse -
kern/console.c- Adam's μ-Resources, Adam Chapweske, 1998.
- 8253/8254 Programmable Interval Timer (PIT) -
inc/timerreg.h- 82C54 CHMOS Programmable Interval Timer, Intel, October 1994. (local copy)
- Data Solutions 8253/8254 Tutorial, Data Solutions.
- 8259/8259A Programmable Interrupt Controller (PIC) -
kern/picirq.*- 8259A Programmable Interrupt Controller, Intel, December 1988.
- Real-Time Clock (RTC) -
kern/kclock.*- Phil Storrs PC Hardware book, Phil Storrs, December 1998. In particular:
- CMOS Memory Map, Padgett Peterson, May 1996.
- M48T86 PC Real-Time Clock, ST Microelectronics, April 2004. (local copy)
- 16550 UART Serial Port -
kern/console.c- PC16550D Universal Asynchronous Receiver/Transmitter with FIFOs, National Semiconductor, 1995.
- Technical Data on 16550, Byterunner Technologies.
- Interfacing the Serial / RS232 Port, Craig Peacock, August 2001.
- IEEE 1284 Parallel Port -
kern/console.c- Parallel Port Central, Jan Axelson.
- Parallel Port Background, Warp Nine Engineering
- IEEE 1284 - Updating the PC Parallel Port, National Instruments.
- Interfacing the Standard Parallel Port, Craig Peacock, August 2001.
- IDE hard drive controller -
fs/ide.c- AT Attachment with Packet Interface - 6 (working draft), ANSI, December 2001.
- Programming Interface for Bus Master IDE Controller, Brad Hosler, Intel, May 1994.
- The Guide to ATA/ATAPI documentation, Constantine Sapuntzakis, January 2002.
- Sound cards (not supported in 6.828 kernel, but you're welcome to do it as a challenge problem!)
- Signal Processing using Sound Cards
- Sound Blaster Series Hardware Programming Guide, Creative Technology, 1996.
- 8237A High Performance Programmable DMA Controller, Intel, September 1993
- Sound Blaster 16 Programming Document, Ethan Brodsky, June 1997.
- Sound Programming, Inverse Reality.