File System Flashcards
What is the role of the OS with the file system?
- When Block is requested, Disk controller positions read/write head correctly
- Data read passed to OS in block form
What is LBA
Logical Block Addresses
* Creates Linear Address Space
What are Inodes?
- Data Structure that has an ID (the inode address) and represents a file or directory in the file system
- It is stored on the Hard Disk to prevent deletion
Which are Inodes crucial function?
Identification and Metadata Storage: Each inode contains metadata about a file or directory, which includes attributes like size, permissions (who can read, write, or execute the file), timestamps (when the file was created, last accessed, and last modified), and ownership (which user and group own the file).
File Organization: Inodes play a key role in organizing files on the hard disk. They do not contain the file’s name or its actual data but instead store pointers to the disk blocks where the file’s data is stored. This separation of metadata from data allows the file system to efficiently manage files and directories.
Access Control: Through the permissions and ownership information stored in inodes, the file system controls access to files and directories, ensuring that only authorized users and processes can access or modify them.
Linking: Inodes support the creation of hard links to files. A hard link is essentially another name for an existing file, which refers directly to the inode number of that file. Since all hard links to a file share the same inode number, they provide different pathways to access the same file content. This mechanism allows multiple file names (links) to refer to the same physical data on the disk without duplicating the actual data.
Efficiency and Performance: By storing metadata separately from file data, inodes facilitate the quick retrieval of file information without needing to read the file data. This separation enhances file system performance, especially for operations that need to access file metadata (like listing directory contents) but not the file data itself.
How are Directories implemented?
- They are treated similar as files but contain table if filename and corresponding inode number
What information is usually contained in an inode?
The size and access permissions of the files.
Compare the structure and content of an inode-based file and a directory. What similarities and differences can you find?
- Both an inode-based file and a directory are objects that hold data.
- They both have an inode address that point to information about them.
- The content of a file consists of the actual data, like text or binary code, whereas, the directory holds a table of filenames and inode addresses.
- The inode of a file contains file attributes and references to its actual data, while the inode of a directory maintains inode addresses of files and subdirectories within the directory.
- The similarity is that files and directories are both represented by an inode.
- The differences lie in the nature of the data they contain - files hold the actual data while directories hold references to other objects, aiding in the structural organization of the system. In the context of navigating, files are the end point whereas navigation continues with directories