FreeBSD Kernel Internals: Data Structures, Algorithms, and Performance Tuning
X463.4 (2 semester units in EECS)
What Is FreeBSD?
FreeBSD, like Linux, is an open-source UNIX-like operating system
that is widely used to support the core computer infrastructure of many companies worldwide. Because it can be built with a small footprint, it is also seeing increased use in embedded applications. The licensing terms of FreeBSD do not require the distribution of changes and enhancements to the system. The licensing terms of Linux require that all changes and enhancements to the kernel be made available in source form at minimal cost. Thus, companies that need to control the distribution of their intellectual property are increasingly building their products using FreeBSD.
Who Should Take This Course?
This course is of direct use to professionals who work with
FreeBSD systems. Individuals involved in technical and sales support can learn the capabilities and limitations of FreeBSD; system administrators without direct experience with the FreeBSD kernel can learn how to maintain, tune, and configure the system; applications developers can learn how to effectively and efficiently interface with the system; and systems programmers can learn how to extend and enhance the system.
This course provides a broad overview of how the FreeBSD kernel
implements its basic services. It will be most useful to those who
need to learn how these services are provided. Students who will
benefit from this course include operating-system implementers,
system programmers, UNIX application developers, administrators, and interested users. This course is directed to users who have had at least a year of experience using a UNIX-like system. Knowledge of the C programming language is helpful but not essential. They should have an understanding of fundamental algorithms (searching, sorting, and hashing) and data structures (lists, queues, and arrays).
Description
This course will provide a firm background in the FreeBSD kernel.
The course will cover basic kernel services, process structure, the
FreeBSD jail facility for hosting virtual machines, scheduling,
signal handling, and virtual and physical memory management. The kernel I/O structure will be described showing how I/O is multiplexed, special devices are handled, character processing is performed, and the buffer pool is managed. The implementation of the filesystem and its capabilities, including soft updates and snapshots, will be described. The filesystem interface will then be described to show how it can be used to support multiple filesystem types such as Sun Microsystem's Network File System (NFS). The course will also cover the FreeBSD socket-based network architecture, layering, and implementation. Socket communications primitives and internal layering will be discussed, with emphasis on the interfaces between layers; the TCP/IP implementation will be used as an example. A discussion of routing issues will be included. Other system-related topics include performance measurement, system tuning, and security issues. The presentations will emphasize code organization, data structure navigation, and algorithms. It will not cover machine-specific parts of the system, such as device drivers.
October 24, Morning: FreeBSD Kernel Overview
Kernel terminology
Basic kernel services
Process structure
October 24, Afternoon: FreeBSD Kernel Resource Management
Jails
Scheduling
Signals
Virtual memory management
October 31, Morning: FreeBSD Kernel I/O structure
Special files
Pseudo-terminals and job control
Multiplexing I/O
Autoconfiguration strategy
October 31, Afternoon: Filesystem Overview
Filesystem services
Block I/O system (buffer cache)
Filesystem implementation
Soft updates and snapshots
November 14, Morning: Multiple Filesystem Support
Support for multiple filesystems
Volume management
Network File System (NFS)
November 14, Afternoon: Interprocess Communication
Concepts and terminology
Basic IPC services
Example use of IPC and network facilities
November 21, Morning: Networking Implementation
System layers and interfaces
Routing issues
Internet protocols (TCP/IP)
November 21, Afternoon: System Tuning
Performance measurement
System tuning
Crash dump analysis
Security issues
Course Text
Students are expected to have bought or borrowed the textbook by Marshall Kirk McKusick and George V. Neville-Neil,
The Design and Implementation of the FreeBSD Operating System (Addison-Wesley, 2005).
About the Speaker
Dr. Marshall Kirk McKusick writes books and articles, consults,
and teaches classes on UNIX- and BSD-related subjects. For the
past ten years he has been a developer who is committed to the FreeBSD Project. His particular areas of interest are the virtual-memory system and the filesystem. While at the University of California, Berkeley, he implemented the 4.2BSD fast file system, and was the Research Computer Scientist at the Berkeley Computer Systems Research Group (CSRG) overseeing the development and release of 4.3BSD and 4.4BSD. He earned his undergraduate degree in Electrical Engineering from Cornell University and did his graduate work at UC Berkeley, where he received a master's degrees in computer science and business administration, and a doctoral degree in computer science. He is a past president of the Usenix Association, is on the editorial board of ACM's
Queue magazine, and is a member of Usenix, ACM, and IEEE.
There are currently no sections open for enrollment.
Sections closed for enrollment
Sat. Oct. 24, Berkeley
MARSHALL KIRK MCKUSICK, Ph.D., has worked with Unix and BSD development for nearly 30 years. He began with his first paper on the implementation of Berkeley Pascal in 1979, and moved on to pioneering work in the 1980s on the BSD Fast File System, the BSD virtual memory system, and the final release of 4.4BSD-Lite from the UC Berkeley Computer Systems Research Group. He continued on to work on FreeBSD adding soft updates, snapshots, and the second-generation Fast Filesystem to the system.NOTE: This class is closed. For information about related courses, contact your academic department.