Unix Kernel Internals Course Description

Who Should Take this Course

This course presents a broad overview of how the UNIX kernel provides its basic services. It will be most useful to those who need to learn how these services are provided. Individuals involved in technical and sales support can learn the capabilities and limitations of the system; applications developers can learn how to effectively and efficiently interface to the system; systems programmers without direct experience with the UNIX kernel can learn how to maintain, tune, and interface to such systems. The course will provide a detailed look at the networking facilities provided by the UNIX kernel. The course describes the kernel networking architecture and the TCP/IP implementation in the versions of BSD that form the basis for most versions of UNIX. It also covers the changes in the implementation of the FreeBSD release. It will be especially useful for those who maintain, modify, or port the network kernel or utilities to other systems, to those who use or administer TCP/IP networks, and those who wish to understand the network internals. This course is directed to users who have had at least a year of experience using the UNIX system and the C programming language. They should have an understanding of fundamental algorithms (searching, sorting, and hashing) and data structures (lists, queues, and arrays). Students will not need to prove relationship with a source license holder, as no proprietary source code will be presented.


This course will provide a firm background in the UNIX kernel. The course includes coverage of most BSD-derived kernels including Novell's System V Release 4, Sun's Solaris, and DEC's OSF/1. The POSIX kernel interfaces will be used as examples where they are defined. Where they are not defined, the FreeBSD interfaces will be described and then related to other vendors interfaces. The course will cover basic kernel services, process structure, virtual and physical memory management, scheduling, paging and swapping. The kernel I/O structure will be described showing how I/O is multiplexed, special devices are handled, character processing is done, and the buffer pool is managed. The implementation of the filesystem and its capabilities will be described. The filesystem interface will then be generalized to show how to support multiple filesystem types such as Sun Microsystem's Network File System (NFS). Other related topics include performance measurement, system tuning, and security issues. The networking half of the course will start with an overview of networking terminology and an introduction to the interprocess communication interface (sockets). The course will then describe the FreeBSD kernel network architecture, layering, and implementation. This architecture, which is derived from 4.4BSD-Lite, serves as the basis for the networking code in most versions of UNIX, and in several other systems as well. Routing issues will be covered (including use of the Berkeley routing protocol, routed or "RIP"). The tutorial will also include a detailed overview of the support for multiple networking protocol families and address formats and the generalized layering scheme. The system communications primitives and internal layering will be discussed, with emphasis on the interfaces between the layers; the TCP/IP implementation will be used as an example. A detailed discussion of TCP algorithms follows which includes slow start and congestion avoidance. The presentations will emphasize code organization, data structure navigation, and algorithms. It will not cover the machine specific parts of the system such as device drivers.

Course Materials

Each student receives a copy of the textbook by Marshall Kirk McKusick, Keith Bostic, Michael J Karels, and John S. Quarterman, The Design and Implementation of the 4.4BSD Operating System, published by Addison-Wesley. Each student also receives a copy of the course notes which consist of a 550 page binder containing copies of all the overhead slides used in the course and a set of papers that provide supplemental reading to the text book. The evening class and video course also contain a set of weekly readings and exercises along with answers to the exercises.

Further Information

Click here to get syllabus information for the class on video tape.