Random access wasteful of space dynamic storage

This preview shows page 24 - 34 out of 49 pages.

Random access ! Wasteful of space (dynamic storage-allocation problem) ! Files cannot grow 48
Image of page 24

Subscribe to view the full document.

25 Contiguous Allocation of Disk Space 49 Extent-Based Systems ! Many newer file systems (i.e. Veritas File System) use a modified contiguous allocation scheme ! Extent-based file systems allocate disk blocks in extents (another chunks of contiguous space) ! An extent is a contiguous block of disks " Extents are allocated for file allocation " A file consists of one or more extents. 50
Image of page 25
26 Linked Allocation Each file is a linked list of disk blocks: blocks may be scattered anywhere on the disk. 51 File-Allocation Table 52
Image of page 26

Subscribe to view the full document.

27 Indexed Allocation ! Brings all pointers together into the index block. ! Logical view. index table 53 Example of Indexed Allocation 54
Image of page 27
28 Indexed Allocation – Mapping (cont’d) M outer-index index table file 55 Combined Scheme: UNIX (4K bytes per block) 56
Image of page 28

Subscribe to view the full document.

29 Free-Space Management ! Bit vector ( n blocks) 0 1 2 n-1 bit[ i ] = 678 0 block[ i ] free 1 block[ i ] occupied Block number calculation (number of bits per word) * (number of 0-value words) + offset of first 1 bit 57 Free-Space Management (cont’d) ! Bit map requires extra space " Example: block size = 2 12 bytes, disk size = 2 30 bytes (1 gigabyte) n = 2 30 /2 12 = 2 18 bits (or 32K bytes) ! Linked list (free list) " Cannot get contiguous space easily " No waste of space ! Grouping " Stores the addresses of n free blocks in the first free table " The first n-1 of these blocks are actually free. The last block contains the addresses of another n free blocks, and so on ! Counting " Take advantage of the fact that several contiguous blocks may be allocated or freed simultaneously " The address of the first free bock and the number (n) of free contiguous blocks. 58
Image of page 29
30 Linked Free Space List on Disk 59 Efficiency and Performance ! Efficiency dependent on: " disk allocation and directory algorithms " types of data kept in file’s directory entry ! Performance " disk cache – separate section of main memory for frequently used blocks " free-behind and read-ahead – techniques to optimize sequential access " improve PC performance by dedicating section of memory as virtual disk, or RAM disk 60
Image of page 30

Subscribe to view the full document.

31 Page Cache ! A page cache caches pages rather than disk blocks using virtual memory techniques ! Memory-mapped I/O uses a page cache ! Routine I/O through the file system uses the buffer (disk) cache ! This leads to the following figure 61 I/O Without a Unified Buffer Cache 62
Image of page 31
32 I/O Using a Unified Buffer Cache A unified buffer cache uses the same page cache to cache both memory-mapped pages and ordinary file system I/O 63 Recovery ! Consistency checking – compares data in directory structure with data blocks on disk, and tries to fix inconsistencies ! Use system programs to back up data from disk to another storage device (floppy disk, magnetic tape, other magnetic disk, optical) ! Recover lost file or disk by restoring data from backup 64
Image of page 32

Subscribe to view the full document.

33 Log Structured File Systems !
Image of page 33
Image of page 34
You've reached the end of this preview.
  • Spring '12
  • GwangS.Jung
  • file systems

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern