File System: Introduction ------------------------------------------------------------------------------ Concept of files: - sequential stream of bytes; (not interpreted at the lower level); - non-volatile; File Attributes: - name; - type; Discussion: MS OS uses file extension as types; UNIX: no support, except for symbolic links; - last modified time, creation time, last use time; - size; - protection (ACL); Access control list: list of (user_ID or group_ID, permission); permission: read, write, execute, append, delete, list; - creator ID; (where are these kept?) File Operations; Referencing a file: file path name; File descriptor table; FS implementation: given an offset, find the block; Tradeoff between large block size and small block size; ------------------------------------------------------------------------------- Directories: - a special form of file; - tree-structure; . except symbolic links; - Directory operations: - hierarchical search of the directory; ------------------------------------------------------------------------------- Example: the MS-DOS FAT file system. ---- Section 11.2.2 of the book; . File Allocation Table (FAT): blocks of a file are linked together in the FAT table; special markers indicate free block or end of file; - reading a random block in a large file is slow! . Directory contains the pairs of all files in the directory; . performance problems with the directory structure: searching for a particular file in a large directory is slow;