1/54
Looks like no tags are added yet.
Persistent Storage
keep a data intact even if there is a power loss
Hard Disk Drive
persistent storage (1)
Solid State Storage Device
persistent storage (2)
File
a linear array of bytes
Inode Number
each file has low-level name as
Store data, disk
filesystem has a responsibility to _ _ persistently on _
Directory
it contains a list of (user-readable name, low-level name) pairs
Open()
use _ system call with O_CREAT flag, in creating files
O_CREAT
create file
O_WRONLY
only write to that file while opened
O_TRUNC
make files size zero (remove any existing content)
File descriptor
open() system call returns _ _
Integer
file descriptor is an _ and is used to access files
File descriptor
what open() returns
Number of bytes
what read() returns
Number of bytes
what write() returns
Current Offset
an open file has a _ _
Current offset
determine where the next read or write will begin reading from or writing to within the file
Implicitly
a read or write of N bytes takes place, N is added to the current offset, update the current offset (1)
Explicitly
lseek(), update the current offset (2)
Fildes
files descriptor
Offset
position the file offset to a particular location within the file
Whence
determine how the seek is performed
Fsync()
the file system will buffer writes in memory for some time
Write
fsync(), _ seem to complete quickly
Disk
fsync(), filesystem forces all dirty data to _ for the file referred to by the file description
Atomic Call
renaming files, it implemented as an atomic call
Metadata
information about each file
Stat
to see stat information, you can use the command line tool _
Inode Structure
file system keeps this type of information in a _ _
Rm
Linux command to remove a file
Unlink()
rm call _ to remove a file
Mkdir()
make a directory
Itself, Parent
empty directory have two entries
Rmdir()
delete a directory
Rmdir()
require that the directory be empty
Hard Links
create another way to refer to the same file
Create another name
the way link works (1)
Refer to same inode number
the way link works (2)
Same Inode Number, Two Human name
result of link()
Reference count
track how many different file names have been linked to this inode
Free Inode and Data Blocks
if the reference count reaches zero, the filesystem _ _ _ _ _ -> truly “delete” the file
Symbolic Link
is more useful than hard link
Directory
hard link cannot create to a _
File, Partition
hard link cannot create to a _ to other _
Unique within
inode numbers are only _ _ a file system
Dangling Reference
when remove a original file, symbolic link points noting
Mkfs
tool, make a file system
Mount()
take an existing directory as a target mount point
Mount()
essentially paste a new file system onto the directory tree at the point
Mount program
show what is mounted on a system
Ext3
a standard disk-based file system
Proc
a file system for accessing information about current processes
Tmpfs
a file system just for temporary files
AFS
a distributed file system