CS 644 OPERATING SYSTEMS

Spring, 2010

Lectures by Betty O'Neil, eoneil@cs.umb.edu

Lectures TuTh 2:00-3:15pm  in  W-1-0040 (changed from W-2-123)

Prerequisites: C/UNIX development experience, CS641 or two grad courses with programming content (compilers, database systems, software engineering, etc.), or an undergrad course in OS; also preferably a computer architecture course.  This course is about kernel programming, and has projects using C programming with makefiles to build code in a Linux-like kernel environment.

Syllabus

Qualifying exam, due at second class.

hw1, due Monday midnight, Feb. 15 hw1 Solution

hw1a, due Sunday, Feb 28 : problems 5 and 6 of hw1 hw1a Solution
    first typescript handed out Thurs Feb. 18. Simple mtip use
    second typescript handed out Tues. Feb. 23. Remote gdb with Xinu

hw2, due Fri, Mar. 12 A Mutex service using semaphores : UNIX/Linux and Xinu hw2 Solution

hw3 Hardware programming : warmup due Monday, Mar 22, rest due Sunday, Mar 28. Solution

hw4 Xinu kernel programming, due Apr. 20, 22 Makefile Solution

project : intro network-like IPC (support files) or LP driver (support files), due May 4, 11
Sample project plans : ipc lp
Solutions : ipc lp

Our Google group : http://groups.google.com/group/cs644s10_umb. Please find your invitation to join the Google group in your email at cs.umb.edu (or other email address if you wrote it on your qual paper.)

Fixes to Love

Jan 26. notes Intro
Jan. 28 notes Processes, virtual machine idea

Feb. 2 notes States of a package (qual solution)
Feb. 4 notes Virtual machine concept

Feb. 9 notes UNIX* System Calls, example: The UNIX Shell
Feb. 11 notes Xinu, handout: User-level Xinu programs, available in $xuex.

Feb. 16 notes Semaphores, esp. in Xinu, mutex, POSIX
Feb. 18 notes UNIX* semaphores, shared memory, handout: POSIX Semaphores Example

Feb. 23 notes intro to hw2, handling platform dependence in C, interrupts in process execution, hardware basics, handout: mon-worker-debug.txt.
Feb. 25 demo script, with annotations

Tu, Mar. 2 notes Programming the Hardware:  Using COM Ports handout: PollingIOHandout
Th, Mar. 4 notes Programming the timer, intro to interrupts
handout on timer.c

Tu, Mar 9 notes hw2, interrupts, Slides on Interrupts
Th, Mar 11 notes interrupt programming, hw3 handout on typewr.c handout on timetest1.c

Tu, Mar. 23 notes System calls and user-kernel separation handout
Th, Mar. 25 notes Midterm Review  Practice Midterm Practice Midterm Solution

Tu, Mar. 30. Midterm Exam
Th, Apr. 1 Chap 3, Chap 4 of Comer: Basic Xinu kernel structures

Tu, Apr. 6: class cancelled
Th, Apr. 8: notes Kernel Mutex in Xinu, understanding resched()

Tu, Apr. 13: Xinu resume, create, send/receive
Th, Apr. 15: notes Xinu send/receive, user and kernel mutex, hw4

Tu, Apr. 20: notes Xinu interrupt handling, Linux: Processes and threads
Th, Apr. 22: notes Linux processes, kernel mutex

Tu, Apr. 27: notes handout Linux kernel mutex, interrupt handling
Th, Apr. 29: notes handout Intro to projects, Xinu i/o system and tty driver

Tu, May 4: notes Xinu tty driver, printer protocol for lp driver
Th, May 6: notes handout UNIX/Linux device drivers, x86 memory management

Tu, May11: notes Final Review

Practice Final Practice Final Solution

Final Exam: Tuesday, May 18, 3:00-6:00 in M-2-415

Resources:

Webpage for ulab and SAPC info—read this to get ready for projects.

Hardware and hardware programming info:
Notes on using C to access hardware registers
Slides on Interrupts
Most important hardware headers: cpu.h, serial.h, lp.h, timer.h, pic.h in $pcinc.

Excerpts from Sargent and Shoemaker (book itself is out of print, here is its info on interrupts, LPT and COM ports) Note particularly the interrupt cycle steps listed on pp. 392-393, and note that in step 7, the interrupt handler additionally stores the data coming in from the device or sends out the data being transmitted to the device, or whatever action is desired for this interrupt.

x86 instruction manual in HTML

CS444 F06: see lectures on hardware and interrupts Sept. 14-21

Linux 2.6 system calls: sysenter/sysexit explained

Linux 2.6 mutex: Anatomy of Linux synchronization methods

Linux device drivers: Linux Kernel Module Programming Guide (esp. 3.1.6 Device Drivers, Chap 4 Character Device Drivers)

From www.gnu.org: GDB manual, other manuals

For navigatable Linux sources:

·         for Love’s book’s version : http://lxr.linux.no/#linux-bk+v2.6.10/

·         for current version : http://lxr.linux.no/linux/

·         for current x86 version : http://lxr.free-electrons.com/