File Managment Flashcards
What is a file?
A named colection of data stored on secondary storage.
Name the 6 attributes stored in a file’s metadata.
name of the file, Identifier of the file, location in storage, Size, Protection mode or permissions, time of access/modification/creation.
Describe Linux’s file system.
Everything is treated as a file, it uses an inode pointer system to describe the files location.
Name the 6 different file types in Linux.
Regular files, directories, special files, Pipes, Links, Symbolic files.
Describe the functionality of a directory
A directory is a table containing two columns, one with the file name and the second with the inode pointer of the file.
Describe the functionality of special files.
Associated with I/O devices, reading from the file gets an input and writing to the file gives the output.
Describe the functionality of Pipes.
Takes the output from a process and gives it as the input to another process.
Describe the functionality of Links.
This is a hard link and points to a file via its Inode. This will keep working even if the file is deleted or moved.
Describe the functionality of Symbolic files.
this is a soft link and points to a file name, this will stop working if the file is deleted or moved.
Why is Linux’s way of doing it good?
The structure makes it very easy for users to change and manipulate different functions only with knowledge of how text files work.
How are files allocated?
File allocation on discs is done in blocks, and each block is dynamically allocated.
How many direct pointers does the inode structure contain?
12
How Does an indirect pointer in the inode structure work?
If their aren’t enough direct pointers then then an indirect pointer will point to a block containing the pointers that point to the additional blocks used in file storage.
What are the advantages of the inode structure?
It is very quick to access small files in direct pointers, but indirect pointers allow storage of very large files.
Why is wear levelling used on an SSD?
To increase the lifetime of the SSD as each block can only be written to a finite number of times.