【Linux】APUE or ULK

APUE: Advance Programming in the Unix Enviroment

ULK  : Undertanding the Linux Kernel

一直想读这两本书,希望对Linux有更多的了解,尤其是memory management & multi-process/thread。据说,APUE是讲如何在Linux上编程,ULK是讲kernel内部如何设计实现的。这个周末把两本书的Preface和Chapter 1都看了一遍,确实如此。

Conclusion:

  • 直接看英文原版,读起来其实不费力,几乎不会有语言障碍。
  • 这两本都是1000页(APUEv3 English, ULK v3 English)的大部头,通读是不可能的,效果也必然不好。要么根据实际问题查找问题答案,要么根据感兴趣的某个主题通读相关章节(如内存管理)。
  • 根据Coding时遇到的实际问题,一般先查找APUE,找不到答案时再深入查找ULK。 如:
    • gettimeofday() 为什么不适合profile
    • 多进程、多线程、多核的联系
  • 根据感兴趣的某个主题,也可以先看APUE得出一个感性、宏观的认识。仍然有兴趣?那么进一步参考ULK吧,这时,一定要看Source code & build  & run. 如:
    • 内存管理
  • In one word, buy both the English version of APUE & ULK for daily reference. 

 

APUE

Preface gives the audience and purpose of the book :

This book describes the programming interface to the Unix system—the system call interface and many of the functions provided in the standard C library. It is intended for anyone writing programs that run under Unix.

The system call interface and the library routines have traditionally been described in Sections 2 and 3 of the Unix Programmer‘s Manual. This book is not a duplication of these sections. Examples and rationale are missing from the Unix Programmers Manual,

and that‘s what this book provides.

By reading the Table of Contents and Chapter 1, the details of APUE focus on the following list. Such a plenty of Processes/Threads, but no specific memory management chapters. 

  • filesystem

    • ch4 Files and Directories
    • ch6 System Data and Information
  • I/O
    • ch3 File I/O
    • ch5 Standard I/O library
    • ch14 Advanced I/O
    • ch18 Terminal I/O
  • Process & Thread
    • ch7 Process Env
    • ch8 Process Control
    • ch9 Process Relationships
    • ch10 Signals
    • ch11 Threads
    • ch12 Thread Control
    • ch13 Daeman Process
    • Interprocess communication
      • ch15 Interprocess communication
      • ch16 Network IPC: Socket
      • ch17 Advanced IPC
  • Examples
    • ch19 Pseudo Terminals
    • ch20 A Database Library
    • ch21 Communicating with a Network Printer

ULK

Preface  gives the audience and purpose of the book:

All people curious about how Linux works and why it is so efficient will find answers here. After reading the book, you will find your way through the many thousands of lines of code, distinguishing between crucial data structures and secondary ones—in

short, becoming a true Linux hacker.

On another level, the book provides valuable insight to people who want to know more about the critical design issues in a modern operating system. It is not specifically addressed to system administrators or programmers; it is mostly for people who want to understand how things really work inside the machine! As with any good guide, we try to go beyond superficial features. We offer a background, such as the history of major features and the reasons why they were used.

By reading the Table of Contents and Chapter 1, the details of ULK focus on the following list. "we describe The process and memory fairly thoroughly", especially memory, "The heart of any Unix kernel is memory management".  No specific chapter for networks. "The book describe the official Linux 2.6.11 version".

  • Kernel

    • memory management

      • ch2 Memory Addressing
      • ch8 Memory Management
      • ch15 The Page Cache
        • how to reduce disk accesses
      • ch16 Accessing Files
      • ch17 Page Frame Reclaiming
    • process management
      • ch3 Processes
      • ch4 Interrupts and Execeptions
        • How to transit between User Model and Kernel Model
      • ch5 Kernel Synchromization
      • ch6 Timing Measurements
        • one type of interrupt
      • ch7 Process Scheduling
      • ch9 Process Address Space
      • ch10 System calls
      • ch11 Signals
      • ch19 Process Communication
      • ch20 Program Execution
    • device drivers
      • ch13 I/O Architecture and Device Drivers
      • ch14 Block Device Drivers
  • filesystem
    • ch12 The Virtual Filesystem VFS
    • ch18 The Ext2 and Ext3 Filesystems
时间: 2024-08-02 11:03:03

【Linux】APUE or ULK的相关文章

【Linux】C++后台开发面试

本文将讲述(Linux)服务器后台开发岗位的要求,包含了大部分会遇到的面试题目.掌握文中提到的技术,也算少许入门水平了,此文既是面经,也是后台开发的入门手册.无论社招还是校招,都可作为一个参考. 本文内容收集自知乎和其他博客,在此整理成章. 校招:以C++基础为主,数据结构和常见算法(ACM经典题目)是必须掌握的. 技术类面试跟学校的经验 / 社团经验 / 学习成绩 挂钩不太高,当然不是说两者没关系.成绩好面试官可喜欢了,但成绩一般的同学不用灰心,入选初面的条件是简历上突出你的技术水平,不需要写

【Linux】数据流重导向(前篇)

数据流重导向 (redirect) 由字面上的意思来看,好像就是将『数据给他传导到其他地方去』的样子? 没错-数据流重导向就是将某个命令运行后应该要出现在屏幕上的数据, 给他传输到其他的地方,例如文件或者是装置 (例如打印机之类的)!这玩意儿在 Linux 的文本模式底下可重要的! 尤其是如果我们想要将某些数据储存下来时,就更有用了! 1)什么是数据流重导向? 什么是数据流重导向啊?这得要由命令的运行结果谈起!一般来说,如果你要运行一个命令,通常他会是这样的: 我们运行一个命令的时候,这个命令可

【Linux】鸟哥的Linux私房菜基础学习篇整理(一)

最近,一直在写PPC的模拟器和汇编器,也在做设计.所以重新看了看<鸟哥的Linux私房菜>,还是有好多命令不太熟悉.就打算写几篇blog记下来. 1. nl [-bnw] filename:添加行号打印参数:-b:指定行号指定的方式,主要有两种: -b a:表示不论是否为空行,也同样列出行号(类似cat -n): -b t:如果有空行,空的那一行不要列出行号(默认值).-n:列出行号表示的方法,主要有三种: -n ln:行号在屏幕的最左方显示: -n rn:行号在自己字段的最右方显示,且不加0

【Linux】JDK+Eclipse 搭建C/C++开发环境

注:本文所提供的参考示例是在CentOS Linux环境下的安装,不保证适用于其他版本的Linux系统. ·    安装前的注意事项 编译源代码是需要对应的代码编译工具的,本文中安装的Eclipse只是一个编写代码的外壳,不能对代码进行编译工作,所以你的Linux系统应当安装了编译器,这样Eclipse在编译源代码的时候才可以调用到对应的编译器:小编安装了的GCC,也就是我的Eclipse使用g++/gcc 进行代码的编译工作.如果你还没安装GCC的话请参见: [Linux]Linux下GCC的

【Linux】将Oracle安装目录从根目录下迁移到逻辑卷

[Linux]将Oracle安装目录从根目录下迁移到逻辑卷 1.1  BLOG文档结构图 1.2  前言部分 1.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① Linux逻辑卷的创建和管理(重点) 1.2.2  相关文章链接 linux逻辑卷管理:http://blog.itpub.net/26736162/viewspace-2124620/,这篇文章非常不错. 1.2.3  本文简介 由于Oracle

【linux】启动

原创,转载时请注明,谢谢.邮箱:[email protected],?地址:http://www.cnblogs.com/embedded-tzp ? 墨迹这么久,总算开始内核源代码分析了. 阶段1 阶段1大部分为汇编, 以程序启动到执行到start_kernel函数为第一阶段. 变量与文件的对应关系. THUMB: src\arch\arm\include\asm\unified.h head.S的很多定义在src\arch\arm\kernel\head-common.S struct pr

【Linux】创建Linux系统服务的方法

http://www.cnblogs.com/silverwings/archive/2010/08/02/1790801.html 使用这个做系统服务,反而导致超图服务的apache无法启动??? 该方法在Ret Hat Enterprise Linux Server 5.5上测试成功.首先需要编写系统服务启动脚本,脚本大致如下: #!/bin/bash # test.sh # chkconfig: 2345 20 81 # description: just for test EXEC_PA

【Linux】LAMP环境的搭建

LAMP定义 LAMP指的Linux(操作系统).ApacheHTTP 服务器,MySQL(有时也指MariaDB,数据库软件) 和PHP(有时也是指Perl或Python) 的第一个字母,一般用来建立web应用平台 安装环境 操作系统:Linux( centOS 6..5 版) 安装步骤 安装mysql数据库,参考[Linux]MySQL解压版安装及允许远程访问 安装Apache服务器和PHP脚本语言 本例采用云安装的方法安装 命令:yum install httpd* php-* 可能会报错

【Linux】在Ubuntu12.04安装VMware Tools

因为同是Linux系统,而且与Debian同源,因此在Ubuntu12.04安装VMware Tools与<[Linux]在Debian安装VMware Tools>(点击打开链接)大同小异,但是在Ubuntu安装VMware Tools更加便捷快速. 1.首先在主机的虚拟机中菜单选择"虚拟机"->"安装VMware工具" 2.之后Ubuntu会弹出一个已经加载好的光盘设备.直接对光盘中的tar.gz复制到/tmp,这个文件夹,装完重启后里面的内容