file management Flashcards
- what 3 things do we want from files?
- what do file systems do?
- what are its 5 main objectives?
files need to have structure, a long term existence and be shareable between devices. File systems provide functions that can be performed on files (create, delete, open etc) objectives include: meeting data management needs of user guarantee data in files is valid optimise performance I/O support minimise lost/destroyed data
- give five user requirements of a file system
user requirements:
- each user can create, delete, read, write and modify files
- each user can re structure files
- each user can move data between files
- each user can back up or recover files
- each user can access files by using symbolic names
- what does a basic file system do?
- what does a basic I/O supervisor do?
- what does a logical I/O do?
a basic file system deals with physical I/O. it is the main interface with the environment outside the computer system. It deals with exchanging blocks of data, block placement and buffering blocks in main memory.
A basic I/O supervisor is responsible for file I/O initiation and termination and selecting and scheduling I/O in the device.
A logical I/O lets users and applications access records and maintains basic file information.
- what are access methods?
- what is file organisation? what does it focus on?
- how can files be organised? (5)
access methods provide a standard interface between applications and devices that hold data so programmers don’t rely on low level instructions.
file organisation is a type of file management referring to the logical structure of records. it determines the way files are accessed. it focuses on short access time, ease of update, economy of storage, simple maintenance and reliability.
files can be organised into piles, sequential files, indexed sequential files, indexed files or direct hashed files.
describe the following: piles sequential files indexed sequential files indexed files direct/hashed files
In piles data is collected in order of arrival and accumulated and saved in a mass of data. records may have different fields and are accessed by an exhaustive search.
sequential files have fixed length and formatted records. field names and lengths are file attributes. this is a key field which records are organised by.
indexed sequential files have an index added for random access and an overflow file is added.
indexed file uses different indexes for different key fields and may contain an exhaustive index too. When a new record is added all index files must be updated.
direct/hashed allows direct access to a block at a known address. a key field is required for each record.
- what is the file directory?
- what does it contain?
- how is it organised?
the file directory is a file owned by the OS that provides a mapping between file names and actual files.
It holds basic info (file name, type, org), address info (volume, start address, size), access control info(owner, access info) and usage info (creation date, creator).
directories can be organised as a list, a two-level scheme or a tree.
- describe the 8 types of access rights
2. what are the problems surrounding simultaneous access?
access rights can be none (existence is not known), knowledge (existence and owner is known), execution, reading (including copying and execution), appending, updating, deleting or changing protection
mutual exclusion and deadlock are issues in simultaneous access
- describe the three file allocation methods
file allocation methods:
contiguous - single set of blocks allocated to a file at creation. Only 1 entry in the allocation table. external fragmentation can occur.
chained - allocation is done in individual blocks each containing a pointer to the next block. Theres only 1 entry in the file allocation table and no ext frag.
indexed - separate one-level index for each file. The index has one entry per portion and the allocation table has the block number for the index. Can be fixed or variable blocks, eliminating external fragmentation.
- what is a disk allocation table?
- what is a bit table?
- what is chained free portions?
- what is indexing?
- what is a volume?
a disk allocation table shows available blocks.
Bit tables have one bit for each block on the disk where 0=free this works well for any allocation method and is as small as possible.
chained free portions have negligible space overhead but leads to fragmentation.
Indexing treats free space as a file and uses an index table. The index should be for variable sized portions rather than blocks (one entry per portion on the disk)
a volume is a collection of addressable sectors in secondary memory. the sectors don’t need to be physically consecutive.
- what are inodes?
2. describe the file management in unix
The unix file management system has index nodes (inodes) that contain key info for a file. Several filenames may be associated with one inode. an active inode is associated with only one file. they store the type/access mode of files, their size, creation time etc.
file allocation is dynamic so blocks may not be contiguous. linux has a virtual file system to interface to user processes.
- describe the windows file system
- define the following:
sector
cluster
volume
NTFS (new technology file system) is recoverable, secure, has large disks and files, allows for multiple data streams, journalling, compression and encryption.
A sector is the smallest physical storage unit
a cluster is one or more contiguous sectors
a volume is the logical partition on a disk containing files