OS Internals - CS 572/Spring 2005 Jim Binkley THIS IS ONLY A ROUGH DRAFT. Syllabus -------- Class time: Tu/Th, 10-11:30 Classroom: Linux Lab (Fab 145) Office(jrb): FAB 120-14 Email: Jim Binkley: jrb@cs.pdx.edu Bart Massey: bart@cs.pdx.edu Office hours: Jim Binkley, Tu/Th 1-2 or by appointment. Feel free to make an appointment via email. class home page: Jim: http://www.cs.pdx.edu/~jrb/ui.html mail list: cs572@cs.pdx.edu Text/s: required: Linux Device Drivers. Corbet, Rubini, Kroah-Hartman. 3rd Edition. ISBN 0-596-00590-3. Feb. 2004. See http://www.oreilly.com for more information. Note: you must have the 3rd edition. Prerequisites ------------- Students must... - be familiar with the functions of a modern multiuser operating system (equivalent to what is learned in CS333 or CS 533), serious UNIX knowledge is a must too. - be GOOD if not excellent with C. - have the ability to send Internet e-mail to the address above. Class Overview -------------- The class this quarter intends to perform a pedagogical experiment. View this as a trip into the jungle with Jim Binkley (first half of class) and Bart Massey (second half) as your safari leaders. We are going to learn about linux device drivers courtesy of the ORA Linux kernel book. Our lectures will for the most part be based on the book and the code examples presented in the book. Jim Binkley will lead the class during the 1st half of the quarter (up to the midterm). Bart Massey will take over after the midterm. As time permits, class material will include: intro to UNIX operating systems, kernel layout, an intro to device drivers, linux modules, various kinds of device drivers including character and network, tasking, time, and synchronization in an SMP environment, Linux kernel memory and hardware management, interrupts, and buses. We also hope that a couple of local Linux kernel gurus will be nice enough to come and give us a talk about topics related to the linux kernel during class. There will be at least two programming assignments done in small teams, both aimed at loadable module projects. Students will be expected to use the 2.6 kernel. There will be a few more details on the assignments below. IMPORTANT: please bring your book to class every session. We will often refer to it in class and look at various code examples and pictures. Calendar (will slip, if necessary) ----------------------------------- This is a very rough calendar and it may be wrong in terms of lecture material. The rough idea is that we will go through the book in order, barring 2 changes: 1. moving network drivers up just after character devices. 2. going over the kernel layout early in the class When What Assignments ---- ---- ----------- week of Mar 29,31 intro/modules A1 out on thursday April 5,7 char devices, network devices April 12,14 debugging note: Bart and Jim will be in Anaheim CA on Thursday April 14 for an open-source USENIX/Freenix conference. April 19,21 catchup April 26,28 more char device, time May 3,5 midterm on the 3rd A1 in at midterm, A2 out on the 5th May 10-12 memory and hw management May 17-19 interrupt handling May 24-26 block device drivers May 31, June 2 buses and catchup A2 in on June 2 June 6-11 final exam week final tuesday 7, 10:15-12:05 summer vacation! Calendar: Apr May Jun S M Tu W Th F S S M Tu W Th F S S M Tu W Th F S 1 2 1 2 3 4 5 6 7 1 2 3 4 3 4 5 6 7 8 9 8 9 10 11 12 13 14 5 6 7 8 9 10 11 10 11 12 13 14 15 16 15 16 17 18 19 20 21 12 13 14 15 16 17 18 17 18 19 20 21 22 23 22 23 24 25 26 27 28 19 20 21 22 23 24 25 24 25 26 27 28 29 30 29 30 31 26 27 28 29 30 Programming Assignment ---------------------- Students will be divided up into teams of 2-3 people and assigned a Linux box at PSU to work on (mostly in the netlab, but some may work in the linux lab or at home for that matter if you have linux on your desktop or laptop). The two assignments will be to develop loadable kernel modules. 1. a1, write a character device driver that writes a structure into the kernel and then reads it out. statistics should be available for i/o for this device from a /proc device structure. 2. a2, write a very tiny ourmon probe module. This is more a less a loadable kernel stack (you will be given a code template based on a rather notorious loadable sniffer called krnsniff.c). Your code should be SMP worthy, and should include several basic and simple network stack "filters" (packet counters counting various types of network addresses and byte counts). Information for the counting should be made available in /proc/ourmon. Several fun side projects will be included here as optional opportunities. It is possible that you may negotiate some other project with the instructors especially for a2. Grading ------- Midterm 100 Final 100 In class contributions 50 Programming Assignment/s 100 Regarding "In class contributions": The class will be considered a seminar. Students are expected to not be passive, to ask questions, and to help the instructor get things straight as we go along. Yes, the instructor will lead us on our pilgrimage into the wonders of the Linux kernel. Still, students will be expected to contribute. Showing up late, not at all, not bringing the text/s, never asking a single question, will not be regarded favorably. Your final grade for the course is determined by determining the weighted percentage of the points you earn with respect to the total possible. Each letter grade occupies roughly a 10 point spread (A: 90%-100%, B: 80%-89%, etc). Initial Assignment ------------------- 1. Use the World Wide Web and take a look at the instructor's home page and the home page (under construction) for the class; i.e., http://www.cs.pdx.edu/~jrb/ui.html 2. subscribe to the class majordomo email mailing list. To subscribe send the following message via SMTP/Internet email: To: majordomo@cs.pdx.edu Subject: -------- subscribe cs572 If you drop out, please unsubscribe. Send email as above to majordomo and make the body "unsubscribe" (without quotes)