《深入理解LINUX内核(第二版)》的原文摘录

  • Further accesses of the process to the released noncontiguous memory area will trigger Page Faults because of the null page table entries. However, the handler will consider such accesses a bug, because the master kernel page tables do not include valid entries. (查看原文)
    jeff 2015-03-21 20:58:45
    —— 引自第350页
  • As stated in the previous section, one of the objectives of the PFRA is to be able to free a shared page frame. To that end, the Linux 2.6 kernel is able to locate quickly all the Page Table entries that point to the same page frame. This activity is called reverse mapping . (查看原文)
    jeff 2015-04-29 20:29:45
    —— 引自第680页
  • The mapping field of the page descriptor determines whether the page is mapped or anonymous, as follows: ... (查看原文)
    jeff 2015-04-29 20:29:45
    —— 引自第680页
  • The Page Table entry can then be determined by considering the starting linear address of the anonymous page, which is easily obtained from the memory region descriptor and the index field of the page descriptor. (查看原文)
    jeff 2015-05-02 16:34:45
    —— 引自第683页
  • Some memory allocation requests are performed by interrupt and exception handlers, which cannot block the current process waiting for a page frame to be freed; moreover, some memory allocation requests are done by kernel control paths that have already acquired exclusive access to critical resources and that, therefore, cannot activate I/O data transfers. (查看原文)
    jeff 2015-05-23 16:17:20
    —— 引自第707页
  • Memory regions owned by a process never overlap, and the kernel tries to merge regions when a new one is allocated right next to an existing one. Two adjacent regions can be merged if their access rights match. (查看原文)
    jeff 2015-05-30 11:24:14
    —— 引自第357页
  • The map_count field of the memory descriptor contains the number of regions owned by the process. By default, a process may own up to 65,536 different memory regions; however, the system administrator may change this limit by writing in the /proc/sys/vm/max_map_count file. (查看原文)
    jeff 2015-05-30 11:24:14
    —— 引自第357页
  • A frequent operation performed by the kernel is to search the memory region that includes a specific linear address. (查看原文)
    jeff 2015-05-30 11:24:14
    —— 引自第357页
  • The head of the red-black tree is referenced by the mm_rb field of the memory descriptor. Each memory region object stores the color of the node, as well as the pointers to the parent, the left child, and the right child, in the vm_rb field of type rb_node. (查看原文)
    jeff 2015-05-30 11:24:14
    —— 引自第357页
  • The first operation of do_ page_fault( ) consists of reading the linear address that caused the Page Fault. When the exception occurs, the CPU control unit stores that value in the cr2 control register (查看原文)
    jeff 2015-05-30 17:44:19
    —— 引自第378页
  • When a process terminates, the kernel changes the appropriate process descriptor pointers of all the existing children of the terminated process to make them become children of init. This process monitors the execution of all its children and routinely issues wait4( ) system calls, whose side effect is to get rid of all orphaned zombies. (查看原文)
    jeff 2015-06-05 07:05:31
    —— 引自第29页
  • For the sake of simplicity, let’s assume that the kernel’s segments, the provisional Page Tables, and the 128 KB memory area fit in the first 8 MB of RAM. In order to map 8 MB of RAM, two Page Tables are required. (查看原文)
    jeff 2015-06-08 07:10:15
    —— 引自第69页
  • The problem with that idea is that, in many cases, the introduction of interruptible sleeps is likely to lead to application bugs. (查看原文)
    jeff 2015-07-21 07:29:30
    —— 引自第81页
  • The six data structures on the right side of the figure refer to specific resources owned by the process. (查看原文)
    jeff 2015-07-21 21:40:57
    —— 引自第81页
  • The getpid( ) system call returns the value of tgid relative to the current process instead of the value of pid, so all the threads of a multithreaded application share the same identifier. Most processes belong to a thread group consisting of a single member; as thread group leaders, they have the tgid field equal to the pid field, thus the getpid( ) system call works as usual for this kind of process. (查看原文)
    jeff 2015-07-21 22:16:02
    —— 引自第84页
  • we learned that a process in Kernel Mode accesses a stack contained in the kernel data segment, which is different from the stack used by the process in User Mode (查看原文)
    jeff 2015-07-24 07:07:00
    —— 引自第85页
  • For each process, Linux packs two different data structures in a single per-process memory area: a small data structure linked to the process descriptor, namely the thread_info structure, and the Kernel Mode process stack. (查看原文)
    jeff 2015-07-24 07:07:00
    —— 引自第85页
  • Linux 2.6 implements the runqueue differently (查看原文)
    jeff 2015-07-24 19:34:50
    —— 引自第89页
<前页 1 2 后页>