Day 27 File System
UNIX File Management Types of files Ordinary – stream of bytes Directory – list of names plus pointers to attributes of the entry Special – map physical devices to file names Pipes – for inter-process communication. Links – an alternative way to access the file. Symbolic links – like shortcuts – data file that contains the name of the file it links to.
In a typical UNIX system Dynamic allocation Non-contiguous Indexed allocation i-node holds the pointers to the datablock i-node holds other attributes too Array of free blocks to track the free blocks.
Volume structure Boot block – code to boot the OS Superblock – attributes about the File system (partition size, free block list, free i-node list, i-node table size) Inode table Data blocks
i-node (index-node) The i-node holds the attributes of the file/directory It also points to the datablocks of the file/directory The pointers to the datablocks can be: Direct pointers Single, double, triple indirect pointers This allows for both small files and large files
Unix directory structure
Question When asked to find /usr/ast/mbox, where does the file system begin the search? When asked to find csse332/project1, where does the file system begin the search?