Pro Tech "Charting the Course ..." protechtraining.com

Linux Internals Overview

Course Summary

Description

The primary responsibilities of any computer operating system are to facilitate I/O between the system hardware and applications, and to manage the execution environment of the applications. Internals is the study of how an operating system accomplishes these tasks. The operating system is unique because it is totally open and free. The source code is readily available and may be modified by anyone who possesses the knowledge to do so. Systems programmers must have a working knowledge of Linux internals in order to write kernel extensions such as device drivers, system calls and virtual file systems. Applications programmers will write more efficient code if they understand what takes place in the operating system when they use the kernel application programming interface (API). By understanding how the Linux kernel allocates hardware and software resources to processes and files, system administrators and support people will be better equipped to manage system performance and troubleshoot Linux.

Objectives

At the completion of this course, the student will be able to describe, in detail, the functionality of each of the Linux kernel subsystems.

Topics

• Overview of the Linux Kernel • Process Management • Linux System Calls • Linux Virtual Memory Manager • Disk-Based File Systems • Kernel File System Structures • Signals • Sockets • The Device I/O Subsystem

Audience

This course is designed for Linux system administrators and support people who desire a comprehensive understanding of the inner workings of the Linux kernel, applications programmers who want to know more about writing code that efficiently interfaces with the Linux kernel and systems programmers who develop kernel extension for Linux.

Prerequisites

The student should have a basic understanding of C programming language, working knowledge of Linux or some other UNIX-based operating system, ability to create and manipulate files, use the vi editor and navigate the hierarchical file system.

Duration

Five days

Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically LINUXODK

Pro Tech "Charting the Course ..." protechtraining.com

Linux Internals Overview

Course Outline

I. An Overview of the Linux Kernel I. The Per-Task Kernel Stack A. The Linux Operating System J. Task Life Cycle B. Just Another UNIX Flavor? K. The fork( ) System Call C. POSIX and Other Standards L. The exec Family of System Calls D. The M. The exit( ) System Call E. Linux Platforms and Languages N. The __clone( ) System Call F. Linux Limitations O. The wait Family of System Calls G. Useful Websites P. An Example - The Shell H. Operating Systems Q. Those Pesky Zombies I. Components of the Kernel R. Real-Time Tasks J. Arrays and Lists S. Task Scheduling and the O(1) K. Linux Subsystems Scheduler L. Kernel Extensions M. Studying the Linux Kernels III. Linux System Calls N. The Linux Kernel Source Code A. System Calls Vs Library Routines O. Header Files - The Next Best Thing B. Mode Switches P. Location of Linux Header Files C. Making a System Call Q. Typedefs D. Returning from a System Call R. Linux Kernel Code Style E. The sys_call_table[ ] S. Programs and Processes F. The unistd.h Header File T. Multi-Tasking G. Adding a System Call to the Kernel U. Single-Threaded Processes H. Configuring and Building a New Kernel V. Multi-Threaded Processes Configuring the GRUB Boot Loader W. Concepts X. Linux Tasks IV. Linux Virtual Memory Manager Y. COFF and ELF A. Virtual Memory Concepts Z. The Linux Process Image B. Swapping Vs Paging AA. Shared and Non-Shared Objects C. Pageable and Pinned Memory BB. Linux Notifiers D. The Process Image Revisited CC. Signals, Interrupts, Exceptions and E. Heap Management Traps F. The SUSE Model DD. The Preemptive Kernel G. The Red Hat Model EE. Kernel Synchronization - Semaphores H. The 4 X 4 Memory Model and Spin Locks I. Per-Thread Stacks FF. Atomic Operations J. Library Mappings and TLS GG. The /proc File System K. Virtual Memory Areas (VMAs) L. Address Translation for Several II. Process Management Hardware Platforms A. Types of Linux Processes M. Page Faults and the Handler B. Daemons and Kernel Threads N. Managing Physical C. Processes, Threads and Tasks O. Memory Memory Zones D. The LinuxThreads Model P. kmalloc( ) and Friends E. The Native POSIX Threads Library Q. The /proc/buddyinfo File (NPTL) R. Slab Allocation F. Task Management Structures S. NUMA and Clustering G. PIDs and PID Hashing T. The mem_map[ ] Array H. The "current" Macro

Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically LINUXODK

Pro Tech "Charting the Course ..." protechtraining.com

Linux Internals Overview

Course Outline (cont’d)

V. Disk-Based File Systems IX. The Device I/O Subsystem A. UNIX File Types A. Device I/O Concepts B. Inodes and Directories B. The Anatomy of a Device Driver C. Superblocks C. Major and Minor Numbers D. The Logical File System D. Device Files E. The Physical File System E. The dev_t Data Type F. Hard Links Vs Symbolic Links F. The Device Switch Table G. cdev and gendisk Structures VI. Kernel File System Structures H. Linux Kernel Modules A. Linux File I/O Overview I. Writing and Compiling Modules B. File Descriptors J. Loading and Managing Modules C. The File List K. Writing a Simple Linux Device Driver D. stdin, stdout and stderr E. The Directory Cache F. The Mount List G. The Inode Cache H. The Slab Allocator Revisited I. Inode and File Operations J. File System Switch Tables K. Disk Buffer Caches L. Block Device Drivers M. Request Queues and I/O Requests N. I/O Scheduling Algorithms O. Memory Mapped Files

VII. Signals A. Signal Names and Numbers B. Signal Actions C. Signals and Threads D. Signal Handlers E. Problems with signal( ) F. Using sigaction( ) G. Signal Kernel Data Structures

VIII. Sockets A. The TCP/IP Protocol Stack B. Network Domains (Address Families) Connection Sockets C. Connectionless Sockets D. Socket System Calls E. Kernel Socket Data Structures F. Send and Receive Queues G. The sk_buff Structure H. Linux Network Device Drivers

Due to the nature of this material, this document refers to numerous hardware and software products by their trade names. References to other companies and their products are for informational purposes only, and all trademarks are the properties of their respective companies. It is not the intent of ProTech Professional Technical Services, Inc. to use any of these names generically LINUXODK