Fsu cop 5641/cis 4930 (Summer 2008) Linux Kernel and Device Driver Programming Course Syllabus



Download 35.61 Kb.
Date28.01.2017
Size35.61 Kb.
#10255

FSU COP 5641/CIS 4930 (Summer 2008)
Linux Kernel and Device Driver Programming

Course Syllabus




Lecture: MTWThF 12:30am – 1:45pm LOV 103

Contact Information


Instructors

Ted Baker (baker@cs.fsu.edu)

Office: 207A Love Building

Office hours: after class and by appointment


Andy Wang (awang@cs.fsu.edu)

Office: 264 Love Building

Office hours: after class and by appointment
Meeting Place and Times
Regular class meetings are scheduled Monday through Friday, 12:30am-1:45pm, in room 103 of the Love Building. The actual class meetings and durations would vary from week to week, depending upon who is teaching and the required pace of instruction.
In addition to the regular class meetings, you will need to schedule lots of time to work on the projects in the lab, and times to meet with the instructor and demonstrate your work for each assignment.
In addition to these meetings you will need to be able to spend a lot of time (how much depends on how many errors you make) working in the lab for this course, which is in room 016 Love.
Description
Survey of 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. A few of the 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 for this course is that students finishing the course will be adequately prepared for individual research projects (honor's thesis, master's project/thesis, Ph.D. dissertation) that require kernel-level programming. My own research in real-time systems sometimes involves instrumentation and performance improvements to device drivers, and possibly to other kernel components such as scheduler, networking, and filesystem. 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. The principal such detail is which hardware we will use for the final project. We still have the cameras and frame grabbers used in prior years, and there is still work to do on integrating support for the various models of frame grabber. However, we may also look at one or more new devices. Present candidates include low-cost USB video cameras and network (Ethernet) drivers. This will be settled before the end of the third week of classes. If you have an idea or preference about a particular device you would like to work on, please contact the instructor during the first week or two of classes.
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 in the 016 Love lab. 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, using the video gear, it will probably only be practical to work in the lab.
One problem with all summer B term courses is pacing. Summer B term courses meet every day (sometimes every other day, in our case), for six weeks. This does not provide much time for thinking and programming. In order to complete a meaningful programming project in six weeks we will need to survey the background material (covered in the text) very quickly, and then focus on the project.
There will be several individual programming exercises, followed by one (larger) team project. The team project will be a device driver. If we again work on video frame grabbers we will be limited by the number of devices. We own six frame grabbers and six cameras, which means we can have up to six teams, of 2-3 people per team working on these devices.

Prerequisites

The prerequisite for this course is COP 4610 Operating Systems and Concurrent Programming, or COP 5570 Advanced Unix Programming. Students are expected to be familiar with using the Unix operating system, via shell commands and the C programming language API, as well as general principles of operating system functions, organization, data structures, and algorithms at the level covered in COP 4610.


Objectives
In order to pass this course, you will need to demonstrate that you have learned to:
  • Configure, compile, and install a Linux kernel from sources

  • Do the same for a kernel module

  • Navigate and read the Linux kernel sources

  • Understand and use correctly the Linux kernel internal services needed by devices drivers, including mutual exclusion, memory mapping, kernel memory allocation, interrupt handling, timekeeping, and scheduling.

  • Design and implement a kernel module of your own

  • Modify, or design and implement from scratch, a device driver

  • Measure the performance of what you have modified or implemented




Textbook and Topics

Authors: Jonathan Corbet, Allessandro Rubini & Greg Kroah-Hartman

Title: Linux Device Drivers, 3rd Edition

Publisher: O'Reilly

ISBN 0-596-00590-3 http://www.lwn.net/Kernel/LDD3
Since there is a free PDF copy on line, and commercial printed copies are available very cheap, I did not order this book with the FSU bookstore. I recommend you order a copy on line. From Amazon.com it is less than $27 (new). You can still download the free PDF copy and print it, but even printed double-sided it is much bulkier than the commercial printing. Just don't use any of the CS Department printers to print out your own hard copy version. Violators of this rule, if caught, will have their departmental computer usage privileges suspended.
Table of Contents:

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 17: Network Drivers
Chapter 18: TTY Drivers

Links to other on-line references, including outline notes and examples covered in class, will be provided during the term.



Assignments



Readings: You will be assigned readings in the textbook and the Linux operating system source code.
Class participation: The study of much of Computer Science is cumulative (i.e., understanding earlier material well is necessary to grasp later material. Do not allow yourself to fall behind, by postponing studying, and then figure you will jump ahead to catch up with the rest of the class.
Experience has shown a high correlation between absenteeism and low grades. Therefore, students are required to attend all class meetings each week. Attendance will be checked at random times throughout the term. You will be allowed two (2) absences without question or justification. After that, your final grade will be reduced by one percent for each missed class. If you have a documented religious holiday or emergency, additional absences may be excused.
Quizzes: Due to the nature of the subject and the shortness of the 6-week summer term, there will be no final examination in this class. Instead, there will be several short quizzes. The quizzes will test your grasp of readings, material covered in the classroom, and the programming assignments you have done, and serve as a check on attendance. They may have a single question, or several. They will generally not be announced in advance. On the average, you should expect about one quiz question per class meeting. If a quiz covers material you are required to know to do a programming assignment the credit for the programming assignment will be contingent on satisfactory performance on the quiz. There will be no make-ups for missed quizzes. If a quiz is missed for an excused absences or lateness, the quiz average for that student will simply be computed based on the quizzes given on the other dates.
Programming assignments: There will be several homework assignments, involving programming in the Linux operating system 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 very simple and get progressively 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 by teams. (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 do 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, on a diskette or Zip disk. 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.
BEWARE The programming assignments for this course may be very time consuming. Debugging kernel code goes much slower than debugging application code, because after every failed test you generally will need to reboot the system. It usually takes several minutes for the system to reboot and restore consistency to the filesystem. Debugging kernel code is also more time consuming because when the system crashes you don't get much information about where an error occurred.
You may be able to do some 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 hard disk 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 Web.



Class Grading

Every piece of graded work will be assigned a score in the range 0 to 100. At the end of the term these numeric grades will be averaged to compute your final grade for the term, using the following table:




Percent

Letter

91- 100

A  [4.00]

89-90

A- [3.75]

85-88

B+ [3.25]




Percent

Letter

81-84

B  [3.00]

79-80

B- [2.75]

75-78

C+ [2.25]




Percent

Letter

71-74

C  [2.00]

69-70

C- [1.75]

64-68

D+ [1.25]




Percent

Letter

61-63

D  [1.00]

59-60

D- [0.75]

0- 58

F  [0.00]



The following are the items that will be graded, and the weights they will be given:




Item

Weight

Assignment 1 (Individual)

10

Assignment 2 (Individual)

15

Assignment 3 (Individual)

15

Assignment 4 (Team Project & Report)

30

Quizzes

30

Do not expect tolerance or forgiveness for lateness during a Summer B term (six week) course. There just is not enough time.


Academic Honor Code

You are required to read the FSU Academic Honor Code and abide by it. Take note that this policy 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 the detailed discussion of how the Honor Code applies in courses that I teach.



Accommodation for Disabilities

Students with disabilities needing academic accommodations should:




  1. Register with and provide documentation to the Student Disability Resource Center (SDRC).

  2. Bring a letter to the Instructor from the SDRC indicating you need academic accommodations. This should be done within the first week of class.


This syllabus and other class materials are available in alternative format upon request.

For more information about services available to FSU students with disabilities, contact the Assistant Dean of Students:


Student Disability Resource Center
97 Woodward Ave. South
108 Student Services Building
Florida State University
Tallahassee, FL 32306-4167

e-mail: sdrc@admin.fsu.edu


phone: (850) 644-9566.

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, and in a six-week summer course there is no time to catch up.


You are required to verify that your e-mail address is included in the class e-mail list. The Instructor will send everyone a message at the start of the term. If you don't get that first message, make sure you are added to the list.
Please check daily for electronic mail sent to you containing information about this course. You are also encouraged to use e-mail to ask questions and report problems, but:


  1. Use the telephone if you want a quick answer. During the work week, response time may be 24 hours or more. I may not read e-mail at all on a typical weekend.

  2. Take care to use an appropriate subject line in any e-mail you send to the instructor, to make it stand out among the "spam". On a typical day 100 or more spam messages may slip through the spam filter. I generally delete, without reading, anything whose sender and subject link do not look like university business.


For security reasons, all e-mail correspondence relating to this course must be via an FSU e-mail account. That means you cannot use, for example, a Yahoo or Hotmail account. Likewise, you should not accept as valid any e-mail purporting to be from the instructor unless it comes from the instructor's "cs.fsu.edu" e-mail address.
Download 35.61 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page