File Systems Flashcards
secondary storage
backs up main memory
usually a disk
file systems provide
a mechanism for storage of data and programs on the disk and accessing them
files are mapped by OS to physical address
different storage devices
- some transfer a character or a block of character at a time
- some can be accessed sequentially/randomly
- some transfer data synchronously/asynchronously
- some can be read-only/read-write
essential requirements for long-term information storage
- It must be possible to store a very large amount of information
- Information must survive termination of process using it
- Multiple processes must be able to access information concurrently
file system
- A way to organise and (persistently) store information
- An abstraction over storage devices:
- Hard disk, SSD, network, RAM, …
- Organised in files and (typically) directories
file system flow
user program syscall -> virtual fs -> page cache -> fs driver (FAT, NFTS…) -> buffer cache ->storage
files
- Abstract storage nodes, i.e. logical storage unit
- a file is a named collection of related information that is recorder on secondary storage
file types
regular: directories, soft links
special: device files, metadata…
file structure
OS perspective: files as streams of bytes
program’s perspective: archives, executables, etc.
file naming
extensions
name length
case sensitivity
once a file is named it becomes independent
file types
- executable
- object
- source
- batch
- text
- word processors
- library
8.print or view - archive
- multimedia
executable file
exe, com, bin or none
ready-to-run machine language program
object
obj, o
compiled machine language, not linked
source code
c, cpp, java, py
j
batch
bat, sh
commands to the command interpreter
text
txt, doc
word processor
wp, doc, rtf
library
lib, a
libraries f routines for programmes
print or view
ps, pdf, jpg
ASCII or binary in a format for printing or viewing
archive
arc, zip, tar
related files grouped into one file sometimes compressed for archiving and storage
multmedia
mp3,m mp4, avi
binary file containing audio or A/V info
MAC OS X file identification
each file has a type specified with it to identify its type
UNIX file identification
magic number stored at the beginning of some files to indicate the type
file attributes
name: human readable
identifier
type
location
size
creation date
last modified
…