Contents
Instructor
Mark StanovichEmail: stanovic [at] cs.fsu.edu
Office: 105E
Office Hours: after class (11am - 1pm Tues. and Thurs.) or by appointment
TA
Muye LiuEmail: mliu [at] cs.fsu.edu
Office Hours: Wed and Fri 4-6pm in MCH202
Meeting Place and Times
Lectures are weekly, Tuesday and Thursday, 9:30 AM - 10:45 AM, in LOV 103.
In addition to the lectures, you will need to schedule sufficient time to complete course projects in MCH 202 computer lab and to meet with the instructor to demonstrate your work for each assignment. You should plan on spending several hours per week outside of class for the assignments. The exact amount will depend on your level of experience and programming skill.
Description
This course surveys the design and internal organization of the Linux kernel, from the viewpoint of kernel modules and device drivers. Students will be expected to do programming projects involving modifications to the kernel source code, probably the code of a device driver.
This course is intended for advanced undergraduate students and graduate students.
Some students who have taken this course have gone on to jobs working for OS or hardware vendors, doing device driver and kernel programming. However, broader benefits of the course include:
- A deeper understanding of core OS concepts, including mutual exclusion, virtual memory, scheduling, etc.
- Improved understanding of software engineering, by study of a well organized but large, complex, long-lived, multi-author software system.
- Improved understanding of internal OS security issues.
- Improved concurrent programming skills.
- Improved C programming skills.
In addition, another objective of this course is that students finishing it will be adequately prepared for research projects that require kernel-level programming. Our research sometimes involves instrumentation and performance improvements to device drivers, and possibly to other kernel components such as: CPU and storage schedulers, networking, and filesystems. Several other members of the CS faculty have similar interests.
This is an evolving course, so some details will need to be worked out as the course progresses. Principal among such details is the team project that you will do in the second half of the course. This is normally a kernel module, typically a device driver, though some students have also done projects in other parts of the Linux kernel, such as a CPU scheduler, a modified filesystem, or an intrusion detection system. If you intend to create a device driver, you will need a hardware device to drive.
Teams and project proposals will need to be approved by the deadline stated in the calendar. So, if you have an idea or preference about a particular device you would like to work on, please contact the instructor during the first few weeks of class.
You will need to have root access to a computer on which you can load Linux for this course. We will provide access to such computers. However, if you have a computer of your own, you will also have the option of doing the individual assignments on your own machine, provided you are willing and able to bring the machine in to demonstrate the working assignments. For the team assignments, depending on what hardware devices you use, it may only be practical to work in the lab.
There will be several individual programming exercises, followed by the larger (team) project mentioned above.
Prerequisites
Students taking this course need to be already familiar with the Unix/Linux operating system, including shell commands and the C programming language, as well as, general principles of operating system functions, organization, data structures, and algorithms at the level covered in COP 4610. Therefore, the formal prerequisite for this course is COP 4610 Operating Systems and Concurrent Programming. COP 5570 Advanced Unix Programming is also accepted. Students who have not taken either of these courses, but believe they may have adequate preparation from other sources, may request permission from the instructor.
Objectives
In order to pass this course, you will need to demonstrate that you have learned to:
- Configure, compile, and install a Linux kernel and kernel module from sources.
- Navigate and understand the Linux kernel sources.
- Understand and use correctly the Linux kernel internals used by devices drivers, including mutual exclusion, memory mapping, kernel memory allocation, interrupt handling, timekeeping, and scheduling.
- Design and implement a kernel module.
- Modify/design and implement a device driver.
- Measure the performance of your device driver.
Textbooks & Covered Topics
Title: Linux Kernel Development (3rd Edition) Author: Robert Love Publisher: Addison-Wesley Professional ISBN 978-0672329463 Hard copy is available from Amazon.com. |
You are required to obtain your own copy of the above book, and read it.
The Robert Love's book is a relatively up-to-date book on Linux kernel programming. The Corbet book listed below is several years behind on more recent changes to the Linux kernel, but still has some good, higher-level descriptions of various Linux kernel subsystems. Also, the structure of the Corbet book provides an organization more inline to this class. Therefore, the lectures will follow the Corbet organization, with updated content from the Love book and of course the Linux kernel sources.
Title: Linux Device Drivers, 3rd Edition Authors: Jonathan Corbet, Allessandro Rubini & Greg Kroah-Hartman Publisher: O'Reilly ISBN 0-596-00590-3 http://www.lwn.net/Kernel/LDD3 |
If you decide you want a hard copy of the Corbet book, order it. Do not use any of the CS Department printers to print out your own hard copy version from the electronic one. Violators of this rule, if caught, will have their departmental computer usage privileges suspended. (Besides, you will not like what you get if you print out a copy.)
Table of Contents:
Preface
Chapter 1: An Introduction to Device Drivers
Chapter 2: Building and Running Modules
Chapter 3: Char Drivers
Chapter 4: Debugging Techniques
Chapter 5: Concurrency and Race Conditions
Chapter 6: Advanced Char Driver Operations
Chapter 7: Time, Delays, and Deferred Work
Chapter 8: Allocating Memory
Chapter 9: Communicating with Hardware
Chapter 10: Interrupt Handling
Chapter 11: Data Types in the Kernel
Chapter 12: PCI Drivers
Chapter 13: USB Drivers
Chapter 14: The Linux Device Model
Chapter 15: Memory Mapping and DMA
Chapter 16: Block Drivers
Chapter 14: Network Drivers
Chapter 14: TTY Drivers
Bibliography
Index
Links to other on-line references, including outline notes and examples covered in class, will be provided during the term.
Attendance & Other Class Participation
The content of this course is cumulative and very compressed. Do not allow yourself to fall behind, expecting to be able to catch up later.
Experience has shown a high correlation between absenteeism and low grades. Therefore, students are required to attend all class meetings. Your final grade will be reduced by one percent for each unexcused missed class. Lateness will count as half a class. Excused absences include: documented illness, deaths in the family and other documented crises, call to active military duty or jury duty, religious holy days, and official University activities.
Readings
You will be assigned readings in the textbook and the Linux operating system source code/documentation throughout the course. Quizzes will be given based on these assigned readings.
Quizzes
Due to the programming-intensive nature of the course, there will be no final examination. Instead, there will be several quizzes. The quizzes will test your grasp of readings, material covered in the classroom, and the programming assignments you have done. They may have multiple questions, and they will generally not be announced in advance. On the average, you should expect about one quiz per week. If a quiz covers material you are required to know to perform a programming assignment, the credit for the programming assignment will be contingent on satisfactory performance on the quiz.
Programming Assignments
There will be several homework assignments, involving programming in the Linux kernel. The objectives of the assignments will be to give you practice working with the ideas and techniques you are learning about in class. Details of the assignments will be announced as the term progresses. They will start out simple and get exponentially more difficult. The first three assignments are required to be done individually. They will be "cookbook" exercises, working up from just compiling and running code that you are given, in the text, with a few modifications. The last assignment should be original, and will be done in a team. (Each individual will be required to evaluate in writing the contribution of the other team members, and this will be taken into account by the instructor in the assignment of individual grades for the project.)
To perform your homework assignments you will be provided access to a PC in a department-run laboratory. Since the kind of programming you will be doing may corrupt the operating system installation, you will need to learn how to install (and reinstall) the operating system. You will also be responsible for backing up your work. Since the number of computers that the department can dedicate to this course is limited, the enrollment in the course will be limited to the number of students who can be served by our lab facilities, plus the number of students who can provide their own computer facilities for use in the course.
BEWARE The assignments for this course can be very time consuming. Debugging kernel code progresses much more slowly than debugging application code, because after every failed test you generally will need to reboot the system to restore the system to a known state. Debugging kernel code can be difficult partly because when the system crashes you don't necessarily get much information about what actually caused the error.
You may be able to do some or all of the work for the assignments of this course on your personal computer, but beware of the following:
- You will need to demonstrate your code to the instructor. That means you will either need to install it on a machine in the lab, or bring in your machine.
- Debugging kernel code can cause loss or damage to data on storage drives. In the worst case, you may "trash" the disk to a point that you need to reload the operating system from scratch. If you do this to your one and only computer, on which you rely for doing important work, it can be very painful.
More information on the programming assignments will be given out each week, and posted on the course website.
Grading
Your final grade will be computed using the following tables:
|
|
|
|
The following are the items that will be graded, and the weights they will be given:
Item | Weight |
---|---|
Assignment 1 (Individual) | 10 |
Assignment 2 (Probably Individual) | 5 |
Assignment 3 (Individual) | 15 |
Assignment 4 (Individual) | 15 |
Assignment 5 (Team Project & Report) | 30 |
Quizzes | 25 |
Academic Honor Policy
The Florida State University Academic Honor Policy outlines the University's expectations for the integrity of students' academic work, the procedures for resolving alleged violations of those expectations, and the rights and responsibilities of students and faculty members throughout the process. Students are responsible for reading the Academic Honor Policy and for living up to their pledge to "...be honest and truthful and ... [to] strive for personal and institutional integrity at Florida State University." (Florida State University Academic Honor Policy, found at http://fda.fsu.edu/Academics/Academic-Honor-Policy.)
You are required to read this policy and abide by it. Note that not only puts you on your honor not to cheat but also requires that you report any cheating you may observe. Each violation will result in a negative score on the assignment or exam, equal to the entire value of the assignment. That is, if the assignment is worth 10 points, the penalty for cheating will be a score of -10 points (not zero). This is intended to make the penalty for cheating greater than the penalty for doing no work at all. Please read Dr. Baker's detailed discussion of how the Honor Code applies here.
Accommodation for Disabilities
Students with disabilities needing academic accommodations should:
- Register with and provide documentation to the Student Disability Resource Center (SDRC).
- Bring a letter to the Instructor from the SDRC indicating the need for accommodation and what type. This should be done during the first week of class.
This syllabus and other class materials are available in alternative formats upon request.
For more information about services available to FSU students with disabilities, contact the Assistant Dean of Students at:
Student Disability Resource Center
874 Traditions Way
108 Student Services Building
Florida State University
Tallahassee, FL 32306-4167
(850)644-9566 (Voice)
(850)644-8504 (TDD)
sdrc@admin.fsu.edu
http://www.disabilitycenter.fsu.edu/
Communication
If you are experiencing difficulty or are concerned about your progress, please contact the instructor right away. Problems are usually easier to solve when they are addressed early.
You are required to verify that your email address is included in the class email list. The Instructor will send everyone a message at the start of the term. If you don't get that first message, make sure to contact the intructor to ensure that you are added to the list.
Please check daily for email sent to you containing information about this course. You are also encouraged to use email to ask questions and report problems, but:
- Use the office hours or ask directly after class if you want a quick answer. During the work week, response time may be 24 hours or more. The instructors may not read email at all on a typical weekend.
- Take care to use an appropriate subject line in any email you send to either of the instructors, to make it stand out among the "spam". We generally delete, without reading, anything whose sender and subject link do not look like university business.
- To ensure a reply, send email from your FSU or FSU CS email account. Email from outside ISP's is sometimes caught by "block hole" filtering, or may not be recognized by the instructor as coming from you if the email username is different from you own name.
Changes to the Syllabus
Except for changes that substantially affect implementation of the evaluation (grading) statement, this syllabus is a guide for the course and is subject to change with advance notice. Notice may be by email, announcement in class meetings, or announcement on Blackboard.