TAILIEUCHUNG - unix filesystems evolution design and implementation phần 7

Lĩnh vực này quy định các loại tập tin mà gnode thuộc, chẳng hạn như một tập tin thường xuyên, thư mục, và như vậy. g_seg. ID phân khúc này được sử dụng để tham khảo các phân đoạn tập tin có chứa các trang lưu trữ cho tập tin đó. g_vnode. Điều này các tài liệu tham khảo lĩnh vực vnode cho tập tin này. g_filocks. | 256 UNIX Filesystems Evolution Design and Implementation The following example shows the linkage between two device special files and the common specfs vnode that represents both. This is also shown in Figure . First of all consider the following simple program which simply opens a file and pauses awaiting a signal include main int argc char argv int fd fd open argv 1 O_RDONLY pause As shown below a new special file is created with the same major and minor number as dev null ls -l dev null crw-r--r-- 1 root other 13 2 May 30 09 17 mynull mknod mynull c 13 2 ls -l mynull crw-r--r-- 1 root other 13 2 May 30 09 17 mynull and the program is run as follows . dopen dev null 1 3715 . dopen mynull 2 3719 Using crash it is possible to trace through the list of file related structures starting out at the file descriptor for each process to see which underlying vnodes they actually reference. First the process table slots are located where the two processes reside crash dumpfile dev mem namelist dev ksyms outfile stdout p grep dopen 336 s 3719 3713 3719 3713 0 46 dopen load 363 s 3715 3713 3715 3713 0 46 dopen load Starting with the process that is accessing the mynull special file the user area is displayed to locate the open files user 336 . OPEN FILES POFILE FLAGS AND THREAD REFCNT 0 F 300106fc690 0 0 1 F 300106fc690 0 0 2 F 300106fc690 0 0 3 F 300106fca10 0 0 Pseudo Filesystems 257 struct snode Figure Accessing devices from different device special files. The file structure and its corresponding vnode are then displayed as shown file 300106fca10 ADDRESS RCNT TYPE ADDR OFFSET FLAGS 300106fca10 1 SPEC 300180a1bd0 0 read vnode 300180a1bd0 VCNT VFSMNTED VFSP STREAMP VTYPE RDEV VDATA VFILOCKS VFLAG 1 0 300222d8578 0 c 13 2 300180a1bc8 0 - snode 300180a1bc8 SNODE TABLE SIZE 256 HASH-SLOT MAJ MIN REALVP COMMONVP NEXTR SIZE COUNT FLAGS - 13 2 3001bdcdf50 30001b5d5b0 0 0 0 The REALVP field references the vnode for the special file within the filesystem that .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.