File System Information
In addition to process ID information, the process environment contains file system information. Associated with each open file is an integer file descriptor value that the operating system uses as an index to a 1,024-entry file descriptor table located in the u ( user ) area for the process. The per-process file descriptor table references a system file table , which is located in kernel space. In turn , the system file table maps to a system inode table that contains a reference to a more complete internal description of the file.
When a child process is generated, it receives a copy of its parent's file descriptor table (this includes the three descriptors stdin , stdout , and stderr ) with the file pointer offset associated with each open file. If a file is marked as shareable, the operating system will need to save each file pointer offset separately. The relationship of process and system tables are shown in Figure 2.10.
Figure 2.10. Process/system file table relationships.