User Flashcards
what are two ways a user can interact with the OS
command line
- shell, unix, errors, paths, pipes, links, setuid
programming interface
- dynamic memory allocation, locks, errors, shared memory
what is a filing system
The filing system lives between the user applications – which want to handle files and the device drivers which move blocks of data to and fro
what does the file store (filing system) provide and allow for
it provides a large, persistent storage mechanism that allows for
- IPC
- access rights
describe how virtual devices are represented in windows vs unix
windows: each device has own tree
unix: branches off one tree
what is a file
basic unit of storage in a filing system
files are….
large
slow to access
permanent
what makes up a file
attributes and blocks
How does a filing system access a file from a file name
each file has a filename that is abstracted to a handle which leads to a descriptor
how do we open a file
system call to fetch
how do we close a file
push any buffered data to the file
how do we perform read/write, why
in blocks
to limit the number of system calls
how do we perform seek on a file
it is costly, we treat the file as an array to allow for random access
what is a memory mapped file
makes the file appear in a process’ virtual memory space
what is file locking
placing a lock on a file prevents against race hazards. only one process can access it
what is a volume
a logical drive
corresponds to a disk partition
when is moving a file easy, when is it complicated
moving files within a volume is simple
moving files between volumes is difficult
what are two file system implementation schemes
FAT and Inodes
describe a file allocation table
have an array of cluster pointers.
the FAT table is a linked list
a directory gives a pointer to the start of a file
fragmentation is common
what is a cluster
set of data blocks
where is FAT most common, what about inodes?
fat in windows
inodes in unix
describe inodes
a structure that contains file attributes and an array of pointers to blocks.
small and kept in memory only when file is in use
files are identified by inode number
how many blocks of an inode point to other blocks
blocks 1-9 for small files
then a pointer that points to 10-17
next pointer, then pointer 18-81
finally, 82-593
describe links
used to copy a file without duplicating data
what is a symbolic link
a soft link, a pointer to the file