Linux Kernel Architecture

(Jacob Rumans) #1

Chapter 10: Filesystems without Persistent Storage


SigPnd: 0000000000000000
ShdPnd: 0000000000000000
SigBlk: 0000000000000000
SigIgn: 0000000000000000
SigCgt: 00000001d1817efd
CapInh: 0000000000000000
CapPrm: 0000000000000000
CapEff: 0000000000000000
Cpus_allowed: 00000000,00000000,00000000,0000000f
Mems_allowed: 00000000,00000001
Information is provided not only on UID/GID and other process numbers but also on memory
allocation, process capabilities, and the state of the individual signal masks (pending, blocked,
etc.).
❑ statandstatmcontain — as a consecutive sequence of numbers — more status information on
the process and its memory consumption.

Thefdsubdirectory contains files with numbers as names; these represent the individual file descriptors
of the process. A symbolic link points to the position in the filesystem that is associated with the file
descriptor, assuming it is a file in the proper sense. Other elements such as pipes that are also addressed
via file descriptors are given a link target in the formpipe:[1434].

Similarly, symbolic links point to files and directories associated with the process:

❑ cwdpoints to the current working directory of the process. If users have the appropriate rights,
they can switch to this directory using
cd cwd
without needing to know which directory it is.
❑ exepoints to the binary file with the application code. In our example, it would point to
/usr/bin/emacs
❑ rootpoints to the root directory of the process. This need not necessarily be the global root direc-
tory (see thechrootmechanism discussed in Chapter 8).

Task-Related Information


Not only the subdirectories of/proccontain information but also the directory itself. General information
relating to no specific kernel subsystem (or shared by several subsystems) resides in files in/proc.

Some of these files were mentioned in earlier chapters. For example,iomemandioportsprovide infor-
mation on memory addresses and ports used to communicate with devices, as discussed in Chapter 6.
Both files contain lists in text form:

wolfgang@meitner>cat /proc/iomem
00000000-0009dbff : System RAM
00000000-00000000 : Crash kernel
0009dc00-0009ffff : reserved
000c0000-000cffff : pnp 00:0d
000e4000-000fffff : reserved
00100000-cff7ffff : System RAM
00200000-004017a4 : Kernel code
004017a5-004ffdef : Kernel data
Free download pdf