File Management Flashcards
What is a file?
A named collection of related information that is recorded on secondary storage (non-volatile memory).
What are typical file attributes (meta data)?
- The name of the file
- The identifier of the file
- The location of the file on a storage device
- The size of the file
- The protection mode of the file, giving permissions
- The times that the file was created/accessed/modified
What are two distinctive features of the Linux file system?
- Everything is a file approach
- Tree-like inode pointer structure
What are the six types of files in Linux?
- Regular files
- Directories
- Special files
- Pipes
- Links
- Symbolic links
What is a hard link in Linux?
A link that points to an inode of a specific file
If the file is moved/deleted the link will still work
What happens to a hard link if the file is moved or deleted?
The link will still work.
What is a symbolic (soft) link in Linux?
points to a specific file path, A pointer to a filename at a particular location in the file system.
What happens to a symbolic link if the file is moved or deleted?
The link will not work.
How is file allocation done in Linux?
In blocks, with each block typically being 4096 bytes.
What are the two types of mass-storage structures discussed?
- Magnetic Disks
- Solid-State Disks
What is a magnetic disk composed of?
A number of spinning circular platters (placed on top of each other) with heads attached to a movable arm.
What is the smallest unit of data that can be transferred to or from a magnetic disk?
A sector, traditionally 512 bytes.
What constitutes a cylinder in a magnetic disk?
The set of tracks across different platters at a given arm position.
What technology do solid-state disks use to store data?
Flash memory, specifically transistors that store data as electrical charges.
What is the typical page size and block size in a solid-state disk?
4KB pages and a 512KB block size.
How can reading or writing to an empty solid-state drive be done?
On a page level.
What is required for erasing flash memory in solid-state disks?
A high amount of voltage, which can only be done on block level.
How do solid-state disks compare to magnetic disks?
- Faster
- More reliable
- More expensive
- More power-efficient
What is wear-levelling in solid-state disks?
A technique used to increase the lifetime of a solid-state disk by spreading writes evenly among the blocks.
What is dynamic wear-levelling?
New data is written to the least-recently-used block. longest amount of time passed since the last write
What is the remaining problem with dynamic wear-levelling?
‘Cold’ data is not moved.
What is static wear-levelling?
Writes dazta to the least recently used block and It periodically moves existing data to the least-recently-used block.
What is the benefit of wear-levelling?
It spreads the writes evenly among the blocks to avoid block failure.
If you remove power from primary storage what happens
the data disappears