Microsoft File System General Comments Boot Sector and BPB Boot Sector and BPB Structure FAT Data Structure

Microsoft File System General Comments Boot Sector and BPB Boot Sector and BPB Structure FAT Data Structure

Graduate Institute of Electronics Engineering, NTU MMiiccrroossoofftt FFiillee SSyysstteemm Instructor: Chia-Tsun Wu. 11/25/2004 ACCESS IC LAB ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU OOuuttlliinnee Types of File System Principles of File System Microsoft File System General Comments Boot Sector and BPB Boot Sector and BPB Structure FAT Data Structure LAB P2 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU TTyyppeess ooff FFiilleeSSyysstteemm DOS FAT 12/16/32, VFAT High Performance FileSystem (HPFS) New Technology FileSystem (NTFS) Extended filesystems (Ext, Ext2, Ext3) Macintosh Hierarchical Filesystem - HFS ISO 9660 - CD-ROM filesystem P3 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU OOtthheerr ffiilleessyysstteemmss ADFS - Acorn Disc File System NSS - Novell Storage Services AFFS - Amiga fast filesystem ODS - On Disk Structure filesystem BeFS - BeOS filesystem QNX filesystem BFS - UnixWare Boot Filesystem Reiser filesystem CrosStor filesystem RFS (CD-ROM Filesystem) DTFS - Desktop filesystem RomFS - Rom filesystem EFS - Enhanced filesystem (Linux) SFS - Secure filesystem EFS - Extent filesystem (IRIX) Spiralog filesystem (OpenVMS) FFS - BSD Fast filesystem System V and derived filesystems GPFS - General Parallel Filesystem Text - (Philips' CD-ROM Filesystem) HFS - HP-UX Hi performance filesystem UDF - Universal Disk Format (DVD-ROM HTFS - High throughput filesystem filesystem) LFS - Linux log structured filesystem UFS JFS - Journaled filesystem (HP-UX, AIX, V7 Filesystem OS/2 5, Linux) VxFS - Veritas filesystem (HP-UX, SCO MFS - Macintosh filesystem UnixWare, Solaris) Minix filesystem XFS - Extended filesystem (IRIX) NWFS - Novell NetWare filesystem Xia FS P4 Graduate Institute of Electronics Engineering, NTU FFiillee--SSyysstteemm SSttrruuccttuurree ACCESS IC LAB ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU IInnttrroodduuccttiioonn 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 Ownership, permissions, and location of the file content I/O transfers between memory and disk are performed in units of blocks (one more more sectors) P6 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLaayyeerreedd FFiillee SSyysstteemm P7 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLaayyeerreedd FFiillee SSyysstteemm ((CCoonntt..)) I/O control device drivers and interrupt handlers Transfer information between main memory and disk system Retrieve block 123 HW-specific instructions Basic file system Issue generic commands to device driver to read and write physical blocks on the disk Physical block: drive 1, cylinder 73, track 2, sector 10 P8 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLaayyeerreedd FFiillee SSyysstteemm ((CCoonntt..)) File-organization module Know about files, their logical blocks, and physical blocks Translate logical blocks to physical blocks (similar to VM) Logical blocks: 0 N Free-space manager Blocks allocation Logical file system manage metadata information Metadata: file-system structure, excluding the actual file contents Manage the directory structure via file control blocks (FCB) P9 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLaayyeerreedd FFiillee SSyysstteemm ((CCoonntt..)) Why Layered file system? All the advantages of the layered approach File system standard: UFS, FAT FAT32, NTFS Duplication of code is minimized for different file system standard Usually I/O control and the basic file system code can be used by multiple file system formats. P10 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU AA TTyyppiiccaall FFCCBB P11 Graduate Institute of Electronics Engineering, NTU FFiillee SSyysstteemm IImmpplleemmeennttaattiioonn ACCESS IC LAB ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU OOnn--DDiisskk SSttrruuccttuurreess Boot control block: information needed by the system to boot an OS from that partition UFS: boot block; NTFS: partition boot sector Partition control block: partition details No. of blocks, size of the blocks, free-block count and free- block pointers, free FCB count and FCB pointers UFS: superblock; NTFS: Master File Table A directory structure is used to organize the files File control block: many of the file s details File permissions, ownership, size, location of the data blocks UFS: inode; NTFS: within the Master File Table P13 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU IInn--MMeemmoorryy SSttrruuccttuurreess An in-memory partition table containing information about each mounted partition An in-memory directory structure that holds the directory information of recently accessed directories The system-wide open-file table (Chapter 11) The per-process open-file table (Chapter 11) Caching information so that no need to retrieve the information every time from the disk P14 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU IInn--MMeemmoorryy FFiillee--SSyysstteemm SSttrruuccttuurreess File Open File Read P15 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU VViirrttuuaall FFiillee SSyysstteemmss Virtual File Systems (VFS) provide an object-oriented way of implementing file systems VFS separates file-system-generic operations from their implementation by defining a clean VFS interface VFS allows the same system call interface (the API) to be used for different types of file systems VFS is based on a file-representation structure, called a vnode, that contains a numerical designator for a network-wide unique file The API is to the VFS interface, rather than any specific type of file system P16 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU SScchheemmaattiicc VViieeww ooff VViirrttuuaall FFiillee SSyysstteemm Open, read, write P17 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU DDiirreeccttoorryy IImmpplleemmeennttaattiioonn Linear list of file names with pointer to the data blocks Simple to program Time-consuming to execute linear search to find a particular entry Cache and sorted list may help Hash Table linear list with hash data structure Decreases directory search time Collisions situations where two file names hash to the same location Fixed size and the dependence of the hash function on that size P18 Graduate Institute of Electronics Engineering, NTU AAllllooccaattiioonn MMeetthhooddss How to allocate space to files so that disk space is utilized effectively and files can be accessed quickly ACCESS IC LAB ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CCoonnttiigguuoouuss AAllllooccaattiioonn A file occupies a set of contiguous blocks on disk Only starting block (block #) and length (number of blocks) are required in the directory entry (FCB) Fast -- Minimal seek time and head movement Random access any block within the file Similar to dynamic storage-allocation problem External fragmentation may need compaction Files are difficult to grow Find a larger hole and copy the file to the new space P20 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU CCoonnttiigguuoouuss AAllllooccaattiioonn ((CCoonntt..)) P21 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU EExxtteenntt--BBaasseedd SSyysstteemmss Many newer file systems (I.e. Veritas File System) use a modified contiguous allocation scheme Extent-based file systems allocate disk blocks in extents An extent is a contiguous block of disks. Extents are allocated for file allocation. A file consists of one or more extents. Integrate contiguous allocation and linked allocation (see later) P22 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLiinnkkeedd AAllllooccaattiioonn Each file is a linked list of disk blocks Blocks may be scattered anywhere on the disk Directory contains a pointer to the first and last blocks Each block contains a pointer to the next block Advantages No external fragmentation Easy to grow Any free block is OK Disadvantages Effectively for only sequential-access file Space required for the pointers Reliability What if the pointers are lost P23 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLiinnkkeedd AAllllooccaattiioonn ((CCoonntt..)) block = pointer data P24 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLiinnkkeedd AAllllooccaattiioonn ((CCoonntt..)) Solution for spaces for pointers Collect blocks into clusters, and allocate the clusters than blocks ( Allocate Cluster, Block) Fewer disk head seeks and decreases the space needed for block allocation and free-list management Internal fragmentation Solution for reliability Double linked list or store the filename and relative block number in each block More overhead for each file P25 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU LLiinnkkeedd AAllllooccaattiioonn ((CCoonntt..)) FAT (File Allocation Table) OS/2, MS-DOS The table has one entry for each disk block and is indexed by block number Similar to the linked list Contain the block number Pointer of the next block in the file FAT Significant number of disk Data Block head seeks One for FAT, one for data Improved by caching FAT Random access time is improved P26 ACCESS IC LAB Graduate Institute of Electronics Engineering, NTU IInnddeexxeedd AAllllooccaattiioonn Bring all pointers together into the index block An array of disk-block addresses The

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    63 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us