OS Internals - CS 572/Winter 2010 Bart Massey/Jim Binkley Syllabus -------- Class time: Monday/Wed 12:00-13:20 Classroom: FAB 150 Office/s: FAB 120-18 (Bart) Email: Jim Binkley: binkley.jim AT gmail.com Bart Massey, bart AT cs.pdx.edu Office hours: by appointment. Feel free to make an appointment via email. class wiki page: http://wiki.cs.pdx.edu/cs572 mail list: mailman list - join via the following web page please: https://mailhost.cecs.pdx.edu/mailman/listinfo/cs572 psu calendar: http://www.pdx.edu/registration/calendar.html http://www.pdx.edu/registration/final-exams-schedule Text/s: required: Essential Linux Device Drivers Sreekrishnan Venkateswaran. Prentice Hall. ISBN-10: 0132396556, ISBN-13: 978-0132396554 2008. optional: Linux Device Drivers. Corbet, Rubini, Kroah-Hartman. 3rd Edition. ISBN 0-596-00590-3. Feb. 2004. See http://www.oreilly.com for more information. might help a bit: Understanding the Linux Kernel. Daniel P. Bovet and Marco Cesati. 3rd Edition. ISBN-10: 0596005652, ISBN-13: 978-0596005658, O'Reilly Media, Inc., November 2005. 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 go on a technological adventure. 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 pain, suffering and a couple of books. Our lectures will for the most part be based on the book and examples presented in the book. Jim will lead the class during the 1st half of the quarter (up to the midterm). However Bart will make trouble. Bart 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 one or two 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 as individuals or 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. The first assignment is actually more or less -- download a distribution of some sort and learn how to recompile and install the kernel. Then print hello world with a loadable driver. IMPORTANT: please bring your device driver book to class every session. We will often refer to it in class and look at various code examples and pictures. Calendar (likely wrong) ----------------------- This is a very rough calendar; it may be wrong in terms of lecture material. When What Assignments ---- ---- ----------- Sept 27/29 intro A1 out Sept 29 Oct 4/6 kernel peek/facilities Oct 11/13 laying groundwork/intro Teensy Oct 18/20 catchup/maybe debugging/ guest lecture on 20? Oct 25/27 char device/network interface Nov 1/3 midterm on the 3 A1 in at midterm, A2 out by the 3rd Nov 8/10 usb Nov 15/17 block drivers Nov 22/24 TBA Nov 25 thanksgiving holiday Nov/Dec 29/1 student demos A2 in on Dec 6 Dec 6-11 final exam week final exam MAYBE thursday 9th 12:30 - 14:20 Calendar 2010: Sep S M Tu W Th F S 26 27 28 29 30 Oct Nov Dec 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 1 2 3 4 3 4 5 6 7 8 9 7 8 9 10 11 12 13 5 6 7 8 9 10 11 10 11 12 13 14 15 16 14 15 16 17 18 19 20 12 13 14 15 16 17 18 17 18 19 20 21 22 23 21 22 23 24 25 26 27 19 20 21 22 23 24 25 24 25 26 27 28 29 30 28 29 30 26 27 28 29 30 31 31 Programming Assignment ---------------------- We will do the first assignment as individuals but you are allowed to talk to other students about it. The second assignment will be more open and we may use a team approach. 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, usb device driver. It is possible that you may negotiate some other project with the instructors especially for a2 or for a1 for that matter. Good ideas will be entertained. Bart will have a suggested hardware assignment by the time we get to a2 (after the midterm). Grading ------- Midterm 15 Final 15 In class contributions 10 Programming Assignment/s A1 20 A2 40 More points may be awarded for outstanding in-class contributions. If we decide to omit the final, percentages will be adjusted accordingly. Regarding "In class contributions": The class is considered a seminar. Students are expected to be actively engaged, to ask questions, and to help the instructors get things straight as we go along. Exploration is a team activity. While the instructors may lead the way, if anyone fails to contribute their insights and skills the chances of the whole party getting lost and coming to a bad end increase dramatically. If you show up late or not at all, consistently fail to bring the text to class, or never ask a single question, we'll throw you to the wolves for the common good. If you do something that violates the University's or the Department's Student Conduct code, we will impose the most severe penalties we can manage. In particular, if you plagiarize (use other people's ideas, text, or code without acknowledgment) we will do what we legally and ethically can to end your academic career. If you have questions, please contact us for clarification. Initial Assignment ------------------- 1. Sign up for the class wiki page. http://wiki.cs.pdx.edu/cs572 2. Subscribe to the class email mailing list. https://mailhost.cecs.pdx.edu/mailman/listinfo/cs572 More information will be given in class about how to do these things. Academic Honesty ---------------- Students are expected to follow the PSU Student Conduct code as well as normal standard of academic integrity. Plagiarism, in particular, is not OK: plagiarism is using any code, text, ideas or collaborators without giving proper credit. If you are caught cheating or plagiarizing, Bart will do what he can within the bounds of law and ethics to end your academic career.