File System Flashcards

1
Q

How is the file system Accessed

A
  • Via the Hard Disk in Large blocks
  • 512 bytes, 4 Kikibytes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the role of the OS with the file system?

A
  • When Block is requested, Disk controller positions read/write head correctly
  • Data read passed to OS in block form
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is LBA

A

Logical Block Addresses
* Creates Linear Address Space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are Inodes?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which are Inodes crucial function?

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are Directories implemented?

A
  • They are treated similar as files but contain table if filename and corresponding inode number
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What information is usually contained in an inode?

A

The size and access permissions of the files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Compare the structure and content of an inode-based file and a directory. What similarities and differences can you find?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly