Mastering Linux Kernel Development

A kernel developer's reference manual
 
 
Packt Publishing
  • erschienen am 11. Oktober 2017
  • |
  • 354 Seiten
 
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-1-78588-613-3 (ISBN)
 
Explore Implementation of core kernel subsystemsAbout This BookMaster the design, components, and structures of core kernel subsystemsExplore kernel programming interfaces and related algorithms under the hoodCompletely updated material for the 4.12.10 kernel Who This Book Is ForIf you are a kernel programmer with a knowledge of kernel APIs and are looking to build a comprehensive understanding, and eager to explore the implementation, of kernel subsystems, this book is for you. It sets out to unravel the underlying details of kernel APIs and data structures, piercing through the complex kernel layers and gives you the edge you need to take your skills to the next level.What You Will LearnComprehend processes and fles-the core abstraction mechanisms of the Linux kernel that promote effective simplification and dynamismDecipher process scheduling and understand effective capacity utilization under general and real-time dispositionsSimplify and learn more about process communication techniques through signals and IPC mechanismsCapture the rudiments of memory by grasping the key concepts and principles of physical and virtual memory managementTake a sharp and precise look at all the key aspects of interrupt management and the clock subsystemUnderstand concurrent execution on SMP platforms through kernel synchronization and locking techniquesIn DetailMastering Linux Kernel Development looks at the Linux kernel, its internal arrangement and design, and various core subsystems, helping you to gain significant understanding of this open source marvel. You will look at how the Linux kernel, which possesses a kind of collective intelligence thanks to its scores of contributors, remains so elegant owing to its great design.This book also looks at all the key kernel code, core data structures, functions, and macros, giving you a comprehensive foundation of the implementation details of the kernel's core services and mechanisms. You will also look at the Linux kernel as well-designed software, which gives us insights into software design in general that are easily scalable yet fundamentally strong and safe.By the end of this book, you will have considerable understanding of and appreciation for the Linux kernel.Style and approachEach chapter begins with the basic conceptual know-how for a subsystem and extends into the details of its implementation. We use appropriate code excerpts of critical routines and data structures for subsystems.
  • Englisch
  • Birmingham
  • |
  • Großbritannien
  • 4,32 MB
978-1-78588-613-3 (9781785886133)
weitere Ausgaben werden ermittelt
Raghu Bharadwaj is a leading consultant, contributor, and corporate trainer on the Linux kernel with experience spanning close to two decades. He is an ardent kernel enthusiast and expert, and has been closely following the Linux kernel since the late 90s. He is the founder of TECH VEDA, which specializes in engineering and skilling services on the Linux kernel, through technical support, kernel contributions, and advanced training. His precise understanding and articulation of the kernel has been a hallmark, and his penchant for software designs and OS architectures has garnered him special mention from his clients. Raghu is also an expert in delivering solution-oriented, customized training programs for engineering teams working on the Linux kernel, Linux drivers, and Embedded Linux. Some of his clients include major technology companies such as Xilinx, GE, Canon, Fujitsu, UTC, TCS, Broadcom, Sasken, Qualcomm, Cognizant, STMicroelectronics, Stryker, and Lattice Semiconductors.
  • Cover
  • Title Page
  • Copyright
  • Credits
  • About the Author
  • About the Reviewer
  • www.PacktPub.com
  • Customer Feedback
  • Table of Contents
  • Preface
  • Chapter 1: Comprehending Processes, Address Space, and Threads
  • Processes
  • The illusion called address space
  • Kernel and user space
  • Process context
  • Process descriptors
  • Process attributes - key elements
  • state
  • pid
  • tgid
  • thread info
  • flags
  • exit_code and exit_signal
  • comm
  • ptrace
  • Process relations - key elements
  • real_parent and parent
  • children
  • sibling
  • group_leader
  • Scheduling attributes - key elements
  • prio and static_prio
  • se, rt, and dl
  • policy
  • cpus_allowed
  • rt_priority
  • Process limits - key elements
  • File descriptor table - key elements
  • fs
  • files
  • Signal descriptor - key elements
  • signal
  • sighand
  • sigset_t blocked, real_blocked
  • pending
  • sas_ss_sp
  • sas_ss_size
  • Kernel stack
  • The issue of stack overflow
  • Process creation
  • fork()
  • Copy-on-write (COW)
  • exec
  • vfork()
  • Linux support for threads
  • clone()
  • Kernel threads
  • do_fork() and copy_process()
  • Process status and termination
  • wait
  • exit
  • Namespaces and cgroups
  • Mount namespaces
  • UTS namespaces
  • IPC namespaces
  • PID namespaces
  • Network namespaces
  • User namespaces
  • Cgroup namespaces
  • Control groups (cgroups)
  • Summary
  • Chapter 2: Deciphering the Process Scheduler
  • Process schedulers
  • Linux process scheduler design
  • Runqueue
  • The scheduler's entry point
  • Process priorities
  • Scheduler classes
  • Completely Fair Scheduling class (CFS)
  • Computing priorities and time slices under CFS
  • CFS's runqueue
  • Group scheduling
  • Scheduling entities under many-core systems
  • Scheduling policies
  • Real-time scheduling class
  • FIFO
  • RR
  • Real-time group scheduling
  • Deadline scheduling class (sporadic task model deadline scheduling)
  • Scheduler related system calls
  • Processor affinity calls
  • Process preemption
  • Summary
  • Chapter 3: Signal Management
  • Signals
  • Signal-management APIs
  • Raising signals from a program
  • Waiting for queued signals
  • Signal data structures
  • Signal descriptors
  • Blocked and pending queues
  • Signal handler descriptor
  • Signal generation and delivery
  • Signal-generation calls
  • Signal delivery
  • Executing user-mode handlers
  • Setting up user-mode handler frames
  • Restarting interrupted system calls
  • Summary
  • Chapter 4: Memory Management and Allocators
  • Initialization operations
  • Page descriptor
  • Flags
  • Mapping
  • Zones and nodes
  • Memory zones
  • Memory nodes
  • Node descriptor structure
  • Zone descriptor structure
  • Memory allocators
  • Page frame allocator
  • Buddy system
  • GFP mask
  • Zone modifiers
  • Page mobility and placement
  • Watermark modifiers
  • Page reclaim modifiers
  • Action modifiers
  • Type flags
  • Slab allocator
  • Kmalloc caches
  • Object caches
  • Cache management
  • Cache layout - generic
  • Slub data structures
  • Vmalloc
  • Contiguous Memory Allocator (CMA)
  • Summary
  • Chapter 5: Filesystems and File I/O
  • Filesystem - high-level view
  • Metadata
  • Inode (index node)
  • Data block map
  • Directories
  • Superblock
  • Operations
  • Mount and unmount operations
  • File creation and deletion operations
  • File open and close operations
  • File read and write operations
  • Additional features
  • Extended file attributes
  • Filesystem consistency and crash recovery
  • Access control lists (ACLs)
  • Filesystems in the Linux kernel
  • Ext family filesystems
  • Ext2
  • Ext3
  • Ext4
  • Common filesystem interface
  • VFS structures and operations
  • struct superblock
  • struct inode
  • Struct dentry
  • struct file
  • Special filesystems
  • Procfs
  • Sysfs
  • Debugfs
  • Summary
  • Chapter 6: Interprocess Communication
  • Pipes and FIFOs
  • pipefs
  • Message queues
  • System V message queues
  • Data structures
  • POSIX message queues
  • Shared memory
  • System V shared memory
  • Operation interfaces
  • Allocating shared memory
  • Attaching a shared memory
  • Detaching shared memory
  • Data structures
  • POSIX shared memory
  • Semaphores
  • System V semaphores
  • Data structures
  • POSIX semaphores
  • Summary
  • Chapter 7: Virtual Memory Management
  • Process address space
  • Process memory descriptor
  • Managing virtual memory areas
  • Locating a VMA
  • Merging VMA regions
  • struct address_space
  • Page tables
  • Summary
  • Chapter 8: Kernel Synchronization and Locking
  • Atomic operations
  • Atomic integer operations
  • Atomic bitwise operations
  • Introducing exclusion locks
  • Spinlocks
  • Alternate spinlock APIs
  • Reader-writer spinlocks
  • Mutex locks
  • Debug checks and validations
  • Wait/wound mutexes
  • Operation interfaces:
  • Semaphores
  • Reader-writer semaphores
  • Sequence locks
  • API
  • Completion locks
  • Initialization
  • Waiting for completion
  • Signalling completion
  • Summary
  • Chapter 9: Interrupts and Deferred Work
  • Interrupt signals and vectors
  • Programmable interrupt controller
  • Interrupt controller operations
  • IRQ descriptor table
  • High-level interrupt-management interfaces
  • Registering an interrupt handler
  • Deregistering an interrupt handler
  • Threaded interrupt handlers
  • Control interfaces
  • IRQ stacks
  • Deferred work
  • Softirqs
  • Tasklets
  • Workqueues
  • Interface API
  • Creating dedicated workqueues
  • Summary
  • Chapter 10: Clock and Time Management
  • Time representation
  • Timing hardware
  • Real-time clock (RTC)
  • Timestamp counter (TSC)
  • Programmable interrupt timer (PIT)
  • CPU local timer
  • High-precision event timer (HPET)
  • ACPI power management timer (ACPI PMT)
  • Hardware abstraction
  • Calculating elapsed time
  • Linux timekeeping data structures, macros, and helper routines
  • Jiffies
  • Timeval and timespec
  • Tracking and maintaining time
  • Tick and interrupt handling
  • Tick devices
  • Software timers and delay functions
  • Dynamic timers
  • Race conditions with dynamic timers
  • Dynamic timer handling
  • Delay functions
  • POSIX clocks
  • Summary
  • Chapter 11: Module Management
  • Kernel modules
  • Elements of an LKM
  • Binary layout of a LKM
  • Load and unload operations
  • Module data structures
  • Memory layout
  • Summary
  • Index

Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

40,49 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen