O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Introduction to the FreeBSD Open-Source Operating System

Video Description

This ten-hour video starts with an introduction to the FreeBSD community and explains how it differs from the Linux ecosystem. The video then goes on to provide a firm background in the FreeBSD kernel. The POSIX kernel interfaces are used as examples where they are defined. Where they are not defined, the FreeBSD interfaces are described. The video covers basic kernel services, locking, process structure, scheduling, signal handling, jails, and virtual and physical memory management. The kernel I/O structure is described showing how I/O is multiplexed and the virtual filesystem interface is used to support multiple filesystems. Devices are described showing disk management and their auto-configuration. Next the organization and implementation of the fast filesystem is described, concluding with a discussion of how to maintain consistency in the face of hardware or software failures. The video includes an overview of the ZFS filesystem. The video also covers the socket-based network architecture and layering along with a discussion of routing issues.

The presentations emphasize code organization, data structure navigation, and algorithms.

About the Instructor

Dr. Marshall Kirk McKusick writes books and articles, teaches classes on UNIX- and BSD-related subjects, and provides expert-witness testimony on software patent, trade secret, and copyright issues, particularly those related to operating systems and filesystems. He has been a developer and committer to the FreeBSD Project since its founding in 1994. While at the University of California at Berkeley, he implemented the 4.2BSD fast filesystem 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 the University of California at Berkeley, where he received master's degrees in computer science and business administration and a doctoral degree in computer science. He has twice been president of the board of the Usenix Association and is currently a member and treasurer of the FreeBSD Foundation Board of Directors, a member of the editorial board of ACM's Queue magazine, a senior member of the IEEE, and a member of the Usenix Association, ACM, and AAAS.

Skill Level

  • Intermediate

What You Will Learn

  • The video starts with an introduction to the FreeBSD community and explains how it differs from the Linux ecosystem. The video then goes on to provide a firm background in the FreeBSD kernel. The POSIX kernel interfaces are used as examples where they are defined. Where they are not defined, the FreeBSD interfaces are described.
  • The video covers basic kernel services, locking, process structure, scheduling, signal handling, jails, and virtual and physical memory management.
  • The kernel I/O structure is described showing how I/O is multiplexed and the virtual filesystem interface is used to support multiple filesystems.
  • Devices are described showing disk management and their auto-configuration.
  • The organization and implementation of the fast filesystem is described concluding with a discussion of how to maintain consistency in the face of hardware or software failures.
  • The video includes an overview of the ZFS filesystem and covers the socket-based network architecture, layering and routing issues.
  • The presentations emphasize code organization, data structure navigation, and algorithms.

Who Should Take This Course

  • Applications developers, to learn how to effectively and efficiently interface with the system
  • Systems programmers without direct experience with the FreeBSD kernel, to learn how to maintain, tune, and interface with such systems
  • Those involved in technical and sales support, to learn the capabilities and limitations of the system
  • Enterprise and mobile (Android) communities needing to understand the intricacies of FreeBSD and use its advanced features

Course Requirements

This video is directed to users who have had at least a year of experience using a UNIX-like system. They should have an understanding of fundamental algorithms (searching, sorting, and hashing) and data structures (lists, queues, and arrays).

Table of Contents

Introduction to Introduction to the FreeBSD Open Source Operating System LiveLessons

Lesson 1: Introduction to the FreeBSD Community

Lesson 1 describes the way that the FreeBSD community is organized and the way in which it designs, builds, and manages its distributions. The lesson concludes by describing the best use cases for FreeBSD versus Linux.

Lesson 2: Introduction to the Kernel

Lesson 2 provides an introduction to the FreeBSD kernel. It introduces the user process as the central facility that the kernel provides. It shows how a user process communicates with the kernel through the system call interface and uses kernel-based timers to synchronize time-based events. The lesson concludes with a description of the locking mechanisms that the kernel uses to control access to its data structures.

Lesson 3: Processes

Lesson 3 begins by detailing the components that describe a user process. It then outlines the facilities that the kernel provides to support user processes. These facilities include the scheduler that controls when processes get to run, the signal infrastructure for delivering asynchronous events to processes, and the group and session mechanisms for organizing sets of related processes. The lesson concludes by explaining the use of jails as a lightweight virtualization facility.

Lesson 4: Virtual Memory

Lesson 4 explains the management of the virtual memory used by a process. It starts by describing the layout of a process in its virtual memory and shows how the virtual memory is backed by physical memory, swap space, and executable files and libraries in the filesystem. Next it describes the different types of regions that make up an address space and shows how the kernel tracks and manages these regions. It concludes by explaining how the kernel manages the physical memory both for its own use and on behalf of the user processes.

Lesson 5: I/O System Overview

Lesson 5 examines the kernel from the perspective of its I/O hierarchy. It starts by detailing the data structures used by the kernel to describe I/O requests. It then shows how the kernel exports the capability to multiplex I/O operations to user processes. It describes the data structures used to manage the socket, file, and device I/O descriptors for a process. It concludes by motivating the addition of a virtual filesystem interface and describing the virtual file (vnode) data structure and associated support facilities provided for using the virtual filesystem interface.

Lesson 6: Devices

Lesson 6 gives you an overview of how the kernel manages devices. It introduces the special device concept including the mechanisms for naming and controlling access to devices. Next it describes the volume management and disk I/O-subsystem frameworks. It concludes by showing how devices are initially identified and made available for user processes to use.

Lesson 7: The Fast Filesystem

Lesson 7 begins with a multi-decade history describing the evolution of the local FreeBSD filesystem. It reviews the kernel data structures that link from the user-process file descriptor to the local filesystem’s inode data structure used to control access to and describe the location of a file on disk. Next it describes how the kernel optimizes both the I/O to a file and the layout of the file on the disk. It concludes by describing the requirements for maintaining filesystem consistency in the face of either a hardware or a software crash and the various strategies that are used to implement these requirements.

Lesson 8: The ZFS Filesystem

Lesson 8 presents an overview of the Zettabyte filesystem (ZFS) imported from Open Solaris to FreeBSD. It introduces the modules that make up ZFS and describes their functional and structural organization.

Lesson 9: Networking and Interprocess Communication

Lesson 9 introduces the networking and interprocess communications facilities of FreeBSD. It starts by showing how data flows end-to-end between two user-process sockets through the TCP/IP protocols. It then describes the socket and network protocol structures, the mbuf data buffers used to hold the data packets as they flow through the network, and the interface to the networking hardware. Next it explains the migration from version 4 to version 6 of the IP protocol. It concludes with a discussion of the design of and strategies for routing packets through the network.

Summary of Introduction to the FreeBSD Open Source Operating System LiveLessons

About LiveLessons Video Training

The LiveLessons Video Training series publishes hundreds of hands-on, expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. This professional and personal technology video series features world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, IBM Press, Pearson IT Certification, Prentice Hall, Sams, and Que. Topics include: IT Certification, Programming, Web Development, Mobile Development, Home and Office Technologies, Business and Management, and more. View all LiveLessons on InformIT at: http://www.informit.com/livelessons.

Table of Contents

  1. Introduction
    1. Introduction to the FreeBSD Open-Source Operating System: Introduction 00:02:08
  2. Lesson 1: Introduction to the FreeBSD Community
    1. Learning objectives 00:00:23
    2. 1.1 Understand the FreeBSD Community 00:24:33
    3. 1.2 Compare FreeBSD with Linux 00:10:53
  3. Lesson 2: Introduction to the Kernel
    1. Learning objectives 00:00:28
    2. 2.1 Understand process components 00:13:57
    3. 2.2 Optimize use of system calls 00:28:14
    4. 2.3 Use timers 00:23:22
    5. 2.4 Understand locking hierarchy 00:25:33
  4. Lesson 3: Processes
    1. Learning objectives 00:00:27
    2. 3.1 Understand process structures 00:29:59
    3. 3.2 Select scheduling algorithms 00:14:10
    4. 3.3 Handle asynchronous events 00:01:52
    5. 3.4 Use process groups and sessions 00:05:58
    6. 3.5 Operate jails 00:15:19
  5. Lesson 4: Virtual Memory
    1. Learning objectives 00:00:27
    2. 4.1 Understand virtual memory layout 00:08:53
    3. 4.2 Use physical memory and swap space 00:08:41
    4. 4.3 Understand process address space 00:11:39
    5. 4.4 Use kernel memory allocation 00:12:58
    6. 4.5 Understand types of pages 00:11:02
  6. Lesson 5: I/O System Overview
    1. Learning objectives 00:00:28
    2. 5.1 Understand kernel I/O structure 00:19:30
    3. 5.2 Program multiplexing I/O 00:17:58
    4. 5.3 Understand I/O descriptors 00:11:51
    5. 5.4 Connect to the filesystem interface 00:12:41
    6. 5.5 Understand the contents of a vnode 00:31:48
  7. Lesson 6: Devices
    1. Learning objectives 00:00:27
    2. 6.1 Understand special devices 00:05:06
    3. 6.2 Understand device naming and access 00:10:00
    4. 6.3 Use disk volume management 00:10:19
    5. 6.4 Use the FreeBSD disk I/O subsystem 00:02:14
    6. 6.5 Understand autoconfiguration 00:19:44
  8. Lesson 7: The Fast Filesystem
    1. Learning objectives 00:00:29
    2. 7.1 Understand the history of the fast filesystem 00:17:44
    3. 7.2 Use the current UNIX filesystem 00:03:30
    4. 7.3 Understand the purpose of an inode 00:29:30
    5. 7.4 Optimize I/O in UNIX 00:04:28
    6. 7.5 Optimize storage utilization 00:18:13
    7. 7.6 Maintain filesystem consistency 00:25:32
  9. Lesson 8: The ZFS Filesystem
    1. Learning objectives 00:00:24
    2. 8.1 Understand the Zettabyte filesystem 00:16:25
    3. 8.2 Understand ZFS modules 00:07:46
    4. 8.3 Understand the ZFS functional organization 00:08:01
    5. 8.4 Understand the ZFS structural organization 00:08:36
  10. Lesson 9: Networking and Interprocess Communication
    1. Learning objectives 00:00:31
    2. 9.1 Understand the flow of packets through the network 00:13:28
    3. 9.2 Use sockets and network protocols 00:27:16
    4. 9.3 Understand mbufs and data queueing 00:17:49
    5. 9.4 Connect to the network interface 00:12:26
    6. 9.5 Understand Internet addressing IP version 6 (IPv6) 00:10:48
    7. 9.6 Understand routing design and strategies 00:15:27
  11. Summary
    1. Introduction to the FreeBSD Open-Source Operating System: Summary 00:00:41