Structure of the /proc filesystem

The proc filesystem is rather interesting, because none of the files exist in any real directory structure. Rather, the proper vfs structures are filled in with functions which do gigantic case statements, and in the case of reading a file, get a page, fill it in, and put the result in user memory space. One of the most interesting parts of the proc filesystem is the way that the individual process directories are implemented. Essentially, every process directory has the inode number of its PID shifted left 16 bits into a 32 bit number greater than <#1652#> 0x0000ffff<#1652#>. Within the process directories, inode numbers are reused, because the upper 16 bits of the inode number have been masked off after choosing the right directory. Another interesting feature is that unlike in a ``real'' filesystem, where there is one <#1653#> file_operations<#1653#> structure for the whole filesystem, as file lookup is done, different <#1654#> file_operations<#1654#> structures are assigned to the <#1655#> f_ops<#1655#> member of the file structure passed to those functions, dynamically changing which functions will be called for directory lookup and file reading. <#1656#> [Expand on this section later~--- right now it is mostly here to remind me to finish it...]<#1656#>