1422 Appendix E
The POSIX threading API is thoroughly described in Programming with POSIX
Threads ([Butenhof, 1996]).
Linux and the Unix Philosophy ([Gancarz, 2003]) is a brief introduction to the
philosophy of application design on Linux and UNIX systems.
Various books provide an introduction to reading and modifying the Linux
kernel sources, including Linux Kernel Development ([Love, 2010]) and Understanding
the Linux Kernel ([Bovet & Cesati, 2005]).
For more general background on UNIX kernels, The Design of the UNIX
Operating System ([Bach, 1986]) remains very readable and contains material rele-
vant to Linux. UNIX Internals: The New Frontiers ([Vahalia, 1996]) surveys kernel
internals for more modern UNIX implementations.
For writing Linux device drivers, the essential reference is Linux Device Drivers
([Corbet et al., 2005]).
Operating Systems: Design and Implementation ([Tanenbaum & Woodhull, 2006])
describes operating system implementation using the example of Minix. (See also
http://www.minix3.org/.)
Source code of existing applications
Looking at the source code of existing applications can often provide good exam-
ples of how to use particular system calls and library functions. On Linux distribu-
tions employing the RPM Package Manager, we can find the package that contains
a particular program (such as ls) as follows:
$ which ls Find pathname of ls program
/bin/ls
$ rpm -qf /bin/ls Find out which package created the pathname /bin/ls
coreutils-5.0.75
The corresponding source code package will have a name similar to the above, but
with the suffix .src.rpm. This package will be on the installation media for the distri-
bution or be available for download from the distributor’s web site. Once we
obtain the package, we can install it using the rpm command, and then examine the
source code, which is typically placed in some directory under /usr/src.
On systems using the Debian package manager, the process is similar. We can
determine the package that created a pathname (for the ls program, in this example)
using the following command:
$ dpkg -S /bin/ls
coreutils: /bin/ls
The Linux Documentation Project
The Linux Documentation Project (http://www.tldp.org/) produces freely available
documentation on Linux, including HOWTO guides and FAQs (frequently asked
questions and answers) on various system administration and programming topics.
The site also offers more extensive electronic books on a range of topics.
The GNU project
The GNU project (http://www.gnu.org/) provides an enormous quantity of software
source code and associated documentation.