Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
File-System Implementation.• File-System Structure.• Allocation Methods.• Free-Space Management.• Directory Implementation.• Efficiency and Performance.• Recovery. 11.1 Silberschatz and Galvin 1999 File-System Structure.• File structure. – Logical storage unit. – Collection of related information.• File system resides on secondary storage (disks)• File system organized into layers• File control block – storage structure consisting of information. about a file 11.2 Silberschatz and Galvin 1999 Contiguous Allocation.• Each file occupies a set of contiguous blocks on the disk• Simple – only starting location (block #) and length (number of. blocks) are required• Random access• Wasteful of space (dynamic storage-allocation problem)• Files cannot grow• Mapping from logical to physical Q. LA/512. R. – Block to be accessed = ! + starting address. – Displacement into block = R. 11.3 Silberschatz and Galvin 1999 Linked Allocation.• Each file is a linked list of disk blocks: blocks may be scattered. anywhere on the disk. block = pointer. 11.4 Silberschatz and Galvin 1999 • Allocate as needed, link together; e.g., file starts at block 9. 11.5 Silberschatz and Galvin 1999 Linked Allocation (Cont.).• Simple – need only starting address.• Free-space management system – no waste of space.• No random access.• Mapping. Q. LA/511. R – Block to be accessed is the Qth block in the linked chain of. blocks representing the file – Displacement into block = R + 1.• File-allocation table (FAT) – disk-space allocation used by MS-. DOS and OS/2 11.6 Silberschatz and Galvin 1999 Indexed Allocation.• Brings all pointers together into the index block• Logical view index table. 11.7 Silberschatz and Galvin 1999 Example of Indexed Allocation. 11.8 Silberschatz and Galvin 1999 Indexed Allocation (Cont.)• Need index table.• Random access.• Dynamic access without external fragmentation, but have. overhead of index block• Mapping from logical to physical in a file of maximum size of. 256K words and block size of 512 words. We need only 1 block. for index table. Q. LA/512. R. – Q = displacement into index table. – R = displacement into block. 11.9 Silberschatz and Galvin 1999 Indexed Allocation – Mapping (Cont.)• Mapping from logical to physical in a file of unbounded length. (block size of 512 words)• Linked scheme – Link blocks of index table (no limit on size). Q1. LA / (512 x 511). R1. – Q1 = block of index table. – R1 is used as follows:. Q2. R1 / 512. R2 – Q2 = displacement into block of index table. – R2 displacement into block