1/36
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