tailieunhanh - linux device drivers 2nd edition phần 10

Xử lý tập tin là cốt lõi của bất kỳ hệ thống Unix, và thư mục fs trong Linux là béo nhất của tất cả các thư mục. Nó bao gồm tất cả các hệ thống tập tin được hỗ trợ bởi phiên bản Linux hiện nay, mỗi riêng của thư mục con của nó, cũng như các cuộc gọi hệ thống quan trọng nhất sau khi ngã ba và xuất cảnh. | Thefs Directory The fs Directory File handling is at the core of any Unix system and the fs directory in Linux is the fattest of all directories. It includes all the filesystems supported by the current Linux version each in its own subdirectory as well as the most important system calls after fork and exit. The execve system call lives in and relies on the various available binary formats to actually interpret the binary data found in the executable files. The most important binary format nowadays is ELF implemented by . supports the execution of interpreted files. After detecting the need for an interpreter usually on the or shebang line the file relies on the other binary formats to load the interpreter. Miscellaneous binary formats such as the Java executable format can be defined by the user with a proc interface defined in . The misc binary format is able to identify an interpreted binary format based on the contents of the executable file and fire the appropriate interpreter with appropriate arguments. The tool is configured via proc sys fs binfmt_misc. The fundamental system calls for file access are defined in and . The former also defines close and several other file-access system calls chown for instance . implements select and poll. and implement pipes and named pipes. implements the getdents system call which is how user-space programs read directories the name stands for get directory entries . Other programming interfaces to access directory data such as the readdir interface are all implemented in user space as library functions based on the getdents system call. Most system calls related to moving files around such as mkdir rmdir rename link symlink and mknod are implemented in which in turn lays its foundations on the directory entry cache that lives in . Mounting and unmounting filesystems as well as support for the use of a .