file systems Flashcards
what are file systems
parts of the os that take storage devices and provide structure to them so we can store and retrieve files
unlink operation
remove file alias
link operation
creates a file alias
what are some of the attributes of a file system
name
unique id
type
location
size
access control list/flags
date and time (accessed, modified etc)
ownership (user, group)
.
current directory
..
parent directory
capability based systems
theres a matrix of operations x actors in the system and where they overlap is the permissions that they have for each file
what happens when we create an alias for a file
more than one person can view and edit the file and they each have their own copy
what happens when we allow multiple links to a file
the system becomes a graph potentially with cycles instead of a tree
therefore processes that scan directories may get trapped
which is why we dont allow links back to a directory
what is a virtual file system
it represents the entire set of files and directories across all the devices we have
it has an api that reflects the file system operations
what does the mount command on unix do
integrates a dile system into the virtual one via mapping it into the existing directory structure where mount (mount point) appears so its accessible like the rest of the system
what command in unix do we use to integrate a file system into the virtual one
mount
what are some improvements in file systems
fine grained timestamps (ns)
db tech in file systems (directories, accessing tree of extents)
what is a benefit of dbs in file systems
very powerful
what is a negative of dbs in file systems
problematic due to the expected results of common operations
no longer a simple tree of files and directories which is what the users and applications expect
how does delayed allocation work
delays writes to the disk via in memory buffers and a periodic flush
applications can pre-allocate space on the disk
what is a benefit of delayed allocation
reduces fragmentation (doesnt eliminate)
how do extents and delayed writes make file reads more efficient
theres less meta data to process: pointers, indexes ets
less fragmentation
less head movement
what is the operation for apps to preallocate
fallocate()