The Linux Kernel Book

Rémy Card, Éric Dumas, Franck Mével

Publisher: Wiley, 1998, 518 pages

ISBN: 0-471-98141-9

Keywords: Operating Systems

Last modified: March 7, 2022, 9:22 p.m.

Linux has the performance of many commercial Unix systems. It is stable, yet continues to evolve due to the many worldwide developers continually updating it and adding further functionality. As such, it can control the latest peripheral devices on the market such as flash memory and optical disks. Its power and flexibility and the fact that it is free has assured it an enthusiastic user base in academia, amongst home hobbyist, and increasingly in the business world.

The Linux Kernel Book allows you to delve into the heart of this operating system by means of an in-depth treatment of the internal functioning of the kernel. Each chapter deals in detail with the system components, including:

  • Process management
  • Memory management
  • IPC Systems V
  • Signals
  • Pipes
  • POSIX tty
  • File Systems
  • Loadable modules
  • Administration

The first part of each chapter presents basic concepts and describes the associated system calls, illustrating these with examples written in C. The second part of the chapter extends to a more advanced treatment, showing how the concepts are imimplemented at the level of the kernel and presenting the data structures and the intyernal functions used in Linux.

  1. LINUX: Introduction
    1. History of Linux and its functionality
    2. Many thanks Internet!
    3. References
  2. General overview
    1. Different types of operating system
    2. The role of the operating system
      1. Virtual Machine
      2. Sharing the processor
      3. Memory management
      4. Resource management
      5. Communication hub of the machine
    3. General operating system structure
    4. Kernel mode User mode
      1. Principle
      2. System Calls
  3. Development with Linux
    1. GNU products
      1. Introduction
      2. GNU tools
        1. Introduction
        2. gcc
    2. Development tools
      1. The different phases of compilation
      2. gcc
      3. Debugger
      4. strace
      5. make
        1. Outline
    3. Format of executables
      1. a.out: the original!
      2. ELF
        1. Welcome to the world of ELF
        2. The ELF format
    4. Libraries
      1. Library functionality
      2. Use of libraries
    5. Organisation of kernel source programs
      1. Kernel
      2. Header files
    6. Kernel operation
      1. System calls
        1. Implementation of a system call
        2. Creation of a system call
        3. Return codes
      2. Utility functions
      3. Manipulation of address space
        1. Memory allocation and release
  4. Processes
    1. Basic concepts
      1. The idea of process
      2. Process states
      3. Attributes of a process
      4. Process identifiers
      5. Process creation
      6. Process Groups
      7. Sessions
      8. Multi-programming
    2. Basic system calls
      1. Creation of processes
      2. Termination of current process
      3. Waiting for the termination of a child process
      4. Reading attributes of the current process
      5. Modification of attributes
      6. Compatibility information
      7. Limits
      8. Groups of processes
      9. Sessions
      10. Program execution
    3. Advanced concepts
      1. Scheduling
      2. Personalities
      3. Cloning
    4. Complementary system calls
      1. Changing 'personality'
      2. Scheduling modification
      3. Process priorities
      4. Control of the execution of a process
      5. Cloning
    5. General introduction to implementation
      1. Table of processes
        1. Process descriptors
        2. Organisation of the table of processes
        3. Processes table management
      2. Processor registers
      3. Process synchronisation
        1. Principle
        2. Wait queus
        3. Semaphores
      4. Timers
      5. Execution domains
      6. Formats of executable files
    6. Detailed description of implementation
      1. Internal functions
        1. Process synchronisation
        2. Scheduling
        3. Timers
        4. Wait delays
      2. Implementation of system calls
        1. Process creation
        2. Process termination
        3. Establishing attributes
        4. Modification of attributes
        5. Process and Session groups
        6. Process control
  5. Signals
    1. Basic concepts
      1. Introduction
      2. Definition of signals
      3. List of signals
      4. Display of signals
    2. Basic system calls
      1. Sending a signal
      2. Signal handling
      3. Waiting for the signal
    3. Advanced concepts
      1. Interruptible system calls
      2. Re-entrant functions
      3. Signal groups
    4. Complementary system calls
      1. Advanced signal management
        1. Interruption of signal calls
        2. Blocking of signals
        3. Diversion of signals
        4. Waiting for signals
      2. Alarm management
        1. The system call alarm
        2. Finer time control
      3. The signal SIGCHLD
    5. General overview of implementation
      1. Data structures
        1. Process creation and termination
        2. Transmission of signals
        3. Signal reception
    6. Detailed description of implementation
      1. Library functions
        1. Management of signal sets
        2. The function raise
      2. System calls
        1. Blocking of signals
        2. Signal diversion
        3. Waiting signals
        4. Process suspension whilst awaiting signals
        5. Sending of signals
        6. Alarm management
  6. Filesystems
    1. Basic concepts
      1. Organisation of files
      2. File types
      3. File linkages
      4. File attributes
      5. Input and Output primitives
      6. Input and Output descriptors
    2. Basic system calls
      1. File inputs and outputs
        1. Opening and closing files
        2. Reading and writing data
        3. Positioning within a file
        4. Saving of modified data
      2. Manipulation of files
        1. Creation of links
        2. Deletion of links
        3. Changing the name of a file
        4. Changing the size of a file
        5. Access permissions to a file
        6. Change of the user owner
      3. Management of directories
        1. Creation of directories
        2. Deletion of directories
        3. Current directory
        4. Local root directory
        5. Navigation of directories
      4. Symbolic links
    3. Advanced concepts
      1. Inodes
      2. Input/output descriptors
      3. Sharing descriptors
      4. Locking of files
      5. Mounting filesystems
      6. Disk quotas
    4. Complementary system calls
      1. Reading and writing to several buffers
      2. Duplication of input/output descriptors
      3. File attributes
      4. Dates associated with files
      5. Properties of open files
      6. Control of the process bdflush
      7. Locking
        1. Locking files
        2. Locking a section of a file
      8. Mounting of filesystems
      9. Information on filesystems
      10. Information on filesystem types supported
      11. Manipulation of disk quotas
    5. General overview of implementation
      1. The virtual filesystem
        1. Principle
        2. Operations guaranteed by the VFS
      2. VFS structures
        1. Types of filesystems
        2. Mounted filesystems
        3. Inodes that are in use
        4. Open files
        5. Files opened by a process
        6. Lock descriptors
        7. Disk quota descriptors
        8. Buffer cache memories
        9. Name caches
      3. Generic operations
        1. Operations on superblocks
        2. Operations on inodes
        3. Operations on open files
        4. Operations on disk quotas
    6. Detailed description of implementation
      1. Internal functions of VFS
        1. Management of mounted filesystem descriptors
        2. Management of inodes
        3. Management of open file descriptors
        4. Management of disk quota descriptors
        5. Name caches
        6. Utility functions for inode management
        7. Management of file names
        8. Management of locks
      2. The buffer cache
        1. Description
        2. Management functions for lists of buffers
        3. Inputs/Outputs
        4. Modification of the buffer cache size
        5. Device management functions
        6. Functions for accessing buffers
        7. Re-writing modified buffers
        8. Management of clusters
        9. Initialisation of buffer cache
      3. Implementation of system calls
        1. Organisation of source files
        2. Handling files
        3. Management of file attributes
        4. File input/output
        5. Reading a directory
        6. Management of locks
        7. Management of buffer cache
        8. Management of file systems
        9. Handling input/output descriptors
        10. Descriptor inheritance
        11. Changing directory
        12. Management of disk quotas
      4. Filesystems supported
      5. Implementation of the filesystem Ext2
        1. Characteristics of Ext 2
        2. Physical structure of an Ext2 filesystem
        3. The superblock
        4. Descriptors of block groups
        5. Inode structure
        6. Directory Entry
        7. Operations linked to filesystems
        8. Allocation and release of blocks and inodes
        9. Management of inodes on disk
        10. Management of directories
        11. File inputs/outputs
      6. Implementation of the filesystem /proc
        1. Description
        2. Entries of /proc
        3. Filesystem operations
        4. Directory Management
        5. Operations on inodes and on files
  7. Input/Output
    1. Concepts
    2. System calls
      1. System calls creation of a special file
      2. Input and output in devices
      3. Multiplexing inputs and outputs
      4. Control over devices
    3. General overview of implementation
      1. Peripherals supported by the kernel
      2. Disk input and output
    4. Detailed description of implementation
      1. Management of supported devices
      2. Input/output to disk
      3. Input/output on peripheral devices in block mode
      4. Multiplexing input/output
        1. Principles
        2. Utility functions
        3. The file operation select
        4. Implementation of the primitive select
      5. Interrupt management
      6. Management of DMA chennels
      7. Access to input/output ports
      8. Example of a device in block mode: the disk memory
        1. Overview
        2. Access to the disk memory contents
        3. File operations
        4. Initialisation
        5. Loading disk memory
      9. Example of a peripheral in block mode: the printer
        1. Functioning
        2. Description of ports
        3. Management functions of the printer with polling
        4. Management functions of the printer with interrupts
        5. File input/output operations
        6. Initialisation functions
  8. Memory management
    1. Basic concepts
      1. Process address space
      2. Memory allocation
    2. Basic system calls
      1. Changing the size of data segments
      2. Memory allocation and release functions
    3. Advanced concepts
      1. Memory regions
      2. Memory protection
      3. Locking memory zones
      4. Mapping of files in memory
      5. Swap devices
    4. Complementary system calls
      1. Protection of memory pages
      2. Locking memory pages
      3. Mapping to memory
      4. Synchronisation of memory pages
      5. Management of swap devices
    5. General overview of implementation
      1. Management of page tables
        1. Segmentation
        2. Pagination
        3. Page tables maanged by Linux
        4. Page sharing
        5. Types
      2. Management of memory pages
        1. Page descriptors
        2. Page caches
      3. Memory allocation for the kernel
        1. Allocation of memory pages
        2. Allocation of memory zones
      4. Process address spaces
        1. Memory region descriptors
        2. Address space descriptors
        3. Organisation of region descriptors
      5. Non-contiguous memory allocation for the kernel
      6. Management of swap
        1. Format of swap devices
        2. Swap device descriptors
        3. Addressing of swap entries
        4. Selection of pages to erase
      7. Memory operations
    6. Detailed description of implementation
      1. Allocation for the kernel
        1. Allocation of memory pages
        2. Allocation of memory regions
      2. Management of page tables
      3. Management of memory regions
      4. Processing of traps
      5. Access to the process address space
      6. Modifying memory regions
        1. Creating and deleting memory regions
        2. Locking of memory regions
        3. Memory protection changes
        4. Re-siting of memory regions
      7. Creation and deletion of address space
      8. Mapping of files into memory
      9. Management of swap
        1. Management of swap devices
        2. Input/output on swap devices
        3. Erasing memory pages
  9. POSIX terminals
    1. Basic concepts
      1. General overview
      2. Configuration of a terminal
        1. Canonic mode and non-canoic mode
        2. The termios structure
        3. How communication operates
        4. Configuration of input modes
        5. Configuration of output modes
        6. Configuration of control modes
        7. Configuration of local modes
      3. Special characters and the c_cc table
      4. The command stty
      5. The command setserial
      6. Terminal groups — the session
      7. Pseudo-terminals
    2. POSIX functions
      1. Access to and modification of terminal attributes
      2. An example of line configurations
      3. Transmission speed
      4. Line control
      5. Identification of the terminal
      6. Process groups
      7. Pseudo terminals
    3. Kernel organisation — data structures
      1. Organisation
      2. Internal data structures
        1. The tty_struct structure
        2. The tty_driver structure
        3. The tty_ldisc structure
        4. The winsize structure
        5. The tty_flip_buffer structure
    4. Implementation
      1. Initialisation
      2. Terminal inputs and outputs
      3. Other general functions
      4. Managing disconnection
      5. Management of line discipline
      6. Pseudo-terminals
  10. Communication by pipes
    1. Basic concepts
      1. General overview
      2. Anonymous pipes and named pipes
    2. System calls
      1. Anonymous pipes
        1. Creation of a pipe
        2. An example of usage
        3. Pipe creation and program execution
      2. Named pipes
    3. General overview of implementation
      1. Named pipes
      2. Anonymous pipes
    4. Detailed description of implementation
      1. Creation of a pipe inode
      2. Creation of a named pipe
      3. Creation of an anonymous pipe
      4. Input/output operations
  11. IPC System V
    1. Basic concepts
      1. Introduction
      2. Management of keys
      3. Access permissions
    2. System call
      1. Message queues
        1. Basic structures
        2. Creation and look-up of message queues
        3. Control of message queues
        4. Broadcast of messages
        5. Message reception
        6. An example of system calls in use
      2. Semaphores
        1. Basic structures
        2. Creation and look-up of semaphore groups
        3. Semaphore operations
        4. Control of semaphores
      3. Shared memory
        1. Basic structures
        2. Creation and look-up in shared memory zones
        3. Attachment of a memory zone
        4. Detachment of a memory zone
        5. Control of shared memory zones
        6. Interaction with other system calls
        7. An example of use
    3. Advanced concepts
      1. Kernel compilation option
      2. The programs ipcs and ipcrm
        1. ipcs
        2. ipcrm
    4. General overview of implementation
      1. Common functions
      2. Algorithms
      3. Key management
    5. Detailed description of implementation
      1. Message queue
        1. Internal representation of message queues
        2. Initialisation
        3. Creation of a message queue
        4. Sending a message
        5. Reception of a message
        6. Control of a message queue
      2. Semaphores
        1. Internal representation of semaphores
        2. Initialisation
        3. Creation of semaphores
        4. Control of semaphores
        5. Changing semaphore values
        6. Termination of semaphores
      3. Shared memory
        1. Internal representation of shared memory
        2. Initialisation
        3. Creation of a shared memory zone
        4. Attachment of a memory zone
        5. Removal of a memory zone
        6. Control of shared memory zones
        7. Inheritance in shared memory zones
  12. Loadable modules
    1. Basic concepts
      1. Overview
      2. Compilation
      3. Command line operation: manual loading
      4. On-demand loading
    2. Advanced concepts
      1. Design of loadable modules
        1. Overview
        2. Examples
        3. Compilation and execution
      2. System calls specific to modules
        1. get_kernel_syms
        2. create_module
        3. init_module
        4. delete_module
    3. Implementation of loadable modules
      1. Overview
      2. Implementation of system calls
        1. create_module
        2. init_module
        3. delete_module
        4. get_kernel_syms
      3. Management of virtual files
      4. Ancillary functions
    4. Automatic loading of modules (KERNELD)
      1. Overview
      2. Implementation details
  13. System administration
    1. Basic concepts
      1. Information intended for processes
      2. Information controlling execution
      3. Change of status in kernel
      4. Dynamic configuration of the system
        1. Overview
        2. An alternative method
    2. Administration system calls
      1. Information relating to the workstation
      2. Control of execution
        1. Time
        2. Display mode of kernel messages
        3. Machine status
        4. Clock synchronisation
      3. Change of status of the kernel
      4. Dynamic system configuration
    3. Implementation
      1. sethostname, gethostname, setdomain name and uname
      2. reboot
      3. syslog
      4. gettimeofday, settomeofday, time and stime
        1. time
        2. stime
        3. gettimeofday
        4. settimeofday
        5. sysctl
      5. adjtimex
  • Appendix 1: Phases of a 'C' compilation
    1. Pre-processor
    2. Compiler
    3. Assembler
    4. Linker
  • Appendix 2: Utilization of gdb
  • Appendix 3: Utilization of make
    1. Functioning of make
    2. Writing from a makefile
  • Appendix 4: Management of libraries
    1. Creation and handling tools
    2. Static libraries
    3. a.out dynamic libraries
    4. ELF dynamic libraries
    5. Dynamic loading libraries

Reviews

The Linux Kernel Book

Reviewed by Roland Buresund

Mediocre **** (4 out of 10)

Last modified: May 21, 2007, 2:47 a.m.

Pretty good, but it was outdated (it is about 2.2) as soon as I bought it.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required