File Management Flashcards

1
Q

Why do we need management?

A

To meet the data management needs and requirements e.g create, delete, read and change fules, control the access to own files, controlled access to other users filels etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two types of file systems? Briefly describe them.

A

Storage service: clients don’t know about the physical characteristics of the disks or where the files have been stored on them. Must make sure no file is lost, even if there are hardware failures or software crashes.
Directory service: clients can give convenient text names to files and group them in directories (establishing some relationship with them).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is static and dynamic allocation?

A

Static allocation-
Declare max size in advance (may be hard to guess and may overestimate space). Should be ok if the file never changes. Easy and simple to implement. Fixed memory address.

Dynamic allocation-
Get space as the file needs it. Files are often no longer contiguous.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a block? What is it’s max/min?

A

A portion (unit) size.
Maximum: a single block large enough to hold the entire file.
Minimum: multiple blocks, each block on disk is allocated one disk cell at a time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When choosing the unit allocation size, there is a tradeoff between…

A

-Efficiency from the point of view of a single file.
-Efficiency of the overall system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are some issues faced with in file allocation?

A

-> Having lots of small units requires more space for allocation tables (i.e record where those units are located)
-> Fixed-size portions simplify the reallocation of space.
-> Small fixed-size units reduce wasted space (allocating a unit but not using it entirely)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Name and describe 3 File allocation methods.

A

Contiguous Allocation- single contiguous set of blocks is allocated to a file at the time of file creation (pre-allocation strategy). This has a good performance especially for sequential files. External fragmentation tends to occur (leaves a small amount of unusable memory).
Chained Allocation- each block contains a pointer to the next block in the chain. Allocate on the basis of individual blocks. Best suited to sequential files. Directory only links to the first block and each block points to the next block. There is no accomodation for locality. Files should be “Consolidated” using some utility software to accomodaye locality in chained allocation.
Indexed Allocation- contains a separate index level for each file; the index has one entry for each allocated portion to the file. This supports both sequential and random access to a file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is free space and why is it managed?

A

Free space is space that is not currently allocated. To be able to perform file allocation, we need to know what blocks on the disk are available. Therefore, free space needs to be managed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Define a file directory.

A

A file directory is a structure associated with any file management system and collection of files. It contains info (handled by the OS) about the files, including attributes, location and ownership. The directory itself is a file, owned by the OS and accessible by various file management routines,

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are some typical ‘Basic’ Directory Entries?

A

Name (unique in directory)
Type (text, binary etc)
Organisation (sequential, indexed etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are some typical ‘Address’ Directory Entries?

A

Device (which disk holds the file)
Starting address/blocks used (location id)
Size used (may be in bytes or blocks)
Size allocated (max space allocated for this file)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are some typical ‘Access Control’ Directory Entries?

A

Owner (who has control of the file)
Access Info (what users are allowed to work with the file)
Permitted Actions (controls reading/writing etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are some typical ‘Usage Info’ Directory Entries?

A

Date created
Identity of creator
Date last read access
Identity of last reader
Date last modified
Identity of last modifier
Date of last backup
Current usage (who ahs the file open, is it locked etc)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Describe a type of directory structure.

A

Tree-structured file system- single master directory (root). Each directory may contain files or subdirectories. Names are unique. Note that paths are used to get from the master directory to files.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly