Linux Kernel Architecture

Virtual and physical addresses

在这里插入图片描述

Physical pages are often called page frames. In contrast, the term page is reserved for pages in virtual address space.

The figure also shows that not all pages of the virtual address spaces are linked with a page frame. This may be because either the pages are not used or because data have not been loaded into memory because they are not yet needed. It may also be that the page has been swapped out onto hard disk and will be swapped back in when needed.

Page Tables
Page cache

The kernel uses caches to improve system performance. Data read from slow block devices are held in RAM for a while, even if they are no longer needed at the time. When an application next accesses the data, they can be read from fast RAM, thus bypassing the slow block device. Because the kernel implements access to block devices by means of page memory mappings, caches are also organized into pages, that is, whole pages are cached, thus giving rise to the name page cache.

The far less important buffer cache is used to cache data that are not organized into pages. On traditional Unix systems, the buffer cache serves as the main system cache, and the same approach was used by Linux a long, long time ago. By now, the buffer cache has mostly been superseded by the page cache.

Publisher: Wrox Page : 1371 This book discusses the concepts, structure, and implementation of the Linux kernel. In particular, the individual chapters cover the following topics: ❑ Chapter 1 provides an overview of the Linux kernel and describes the big picture that is investigated more closely in the following chapters. ❑ Chapter 2 talks about the basics of multitasking, scheduling, and process management, and investigates how these fundamental techniques and abstractions are implemented. ❑ Chapter 3 discusses how physical memory is managed. Both the interaction with hardware and the in-kernel distribution of RAM via the buddy system and the slab allocator are covered. ❑ Chapter 4 proceeds to describe how userland processes experience virtual memory, and the comprehensive data structures and actions required from the kernel to implement this view. ❑ Chapter 5 introduces the mechanisms required to ensure proper operation of the kernel on multiprocessor systems. Additionally, it covers the related question of how processes can communicate with each other. ❑ Chapter 6 walks you through the means for writing device drivers that are required to add support for new hardware to the kernel. ❑ Chapter 7 explains how modules allow for dynamically adding new functionality to the kernel. ❑ Chapter 8 discusses the virtual filesystem, a generic layer of the kernel that allows for supporting a wide range of different filesystems, both physical and virtual. ❑ Chapter 9 describes the extended filesystem family, that is, the Ext2 and Ext3 filesystems that are the standard workhorses of many Linux installations. ❑ Chapter 10 goes on to discuss procfs and sysfs, two filesystems that are not designed to store information, but to present meta-information about the kernel to userland. Additionally, a number of means to ease writing filesystems are presented. ❑ Chapter 11 shows how extended attributes and access control lists that can help to improve system security are implemented. ❑ Chapter 12 discusses the networking implementation of the kernel, with a specific focus on IPv4, TCP, UDP, and netfilter. ❑ Chapter 13 introduces how systems calls that are the standard way to request a kernel action from userland are implemented. ❑ Chapter 14 analyzes how kernel activities are triggered with interrupts, and presents means of deferring work to a later point in time. ❑ Chapter 15 shows how the kernel handles all time-related requirements, both with low and high resolution. ❑ Chapter 16 talks about speeding up kernel operations with the help of the page and buffer caches. ❑ Chapter 17 discusses how cached data in memory are synchronized with their sources on persistent storage devices. ❑ Chapter 18 introduces how page reclaim and swapping work.
### 回答1: 《Professional Linux Kernel Architecture》是一本讲解Linux内核实现原理和架构的经典著作。本书对Linux内核的各个方面进行了详细的介绍,包括进程管理、内存管理、文件系统、设备驱动程序等。 该书以实现角度讲解了Linux内核的基本结构和组成部分,旨在帮助读者更好地理解Linux内核的工作原理和实现方式。作者深入浅出地讲解了Linux内核的组成部分,如进程和系统调用,文件系统实现,虚拟内存管理等,让读者对Linux内核实现有更深刻的认识。 该书的内容十分丰富,涵盖了很多关键的主题和概念。作者对每一章节都进行了详细的讲解,给出了大量的代码示例和实际应用案例,可以让读者更好地掌握Linux内核的实现原理和内部运作机制。 总之,《Professional Linux Kernel Architecture》是一本值得阅读的优秀著作,对于那些想深入了解Linux内核实现原理和架构的开发人员和研究人员来说,这本书无疑是不可或缺的一本参考书。 ### 回答2: 《Professional Linux Kernel Architecture》是一本关于 Linux 内核架构的专业书籍。这本书是为那些想要理解 Linux 内核如何工作的程序员和系统管理员设计的。 这本书的主要重点是关于 Linux 内核架构如何工作的细节和原理。书中作者对 Linux 内核进行了全面的分析,并讨论了 Linux 内核的各个组件和功能。这些组件包括进程管理、内存管理、文件系统解析和网络协议栈等。 书中还包括有针对 Linux 内核开发的示例代码和实用工具,以及针对 Linux 内核调试和性能优化的建议。此外,书中还探讨了 Linux 内核的未来发展方向和趋势,以帮助读者更好地理解这个系统。 总而言之,《Professional Linux Kernel Architecture》是一本深入了解 Linux 内核的重要读物,它将帮助程序员和系统管理员理解和运用 Linux 内核,从而提高他们的技能和能力。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值