Operating System Hard Disc (PPT 6) Flashcards
What are the properties of a Hard Disc?
Hard discs have one or more circular platters which:
- are stacked one above each other
- read-write heads move in between platters
- each platter has two surfaces both carrying data
- each platter is partitioned into concentric tracks
- all outer most tracks together form a data cylinder
- all second tracks together form another cylinder
- heads are all at the same cylinder at any instant- only one cylinder can be accessed at any one time
What is the minimum unit of information which can be stored or read?
It is a block. Each track is divided up into these
What are the two types of file allocation?
Pre-allocation and Dynamic Allocation
What is Pre-allocation?
All space is allocated when a file is created
- Inflexible and inefficient
- Estimation of the file size needed which may be wrong
What is Dynamic Allocation?
Space is allocated as needed
-files can grow and shrink, no estimation needed
What is a Portion?
A contiguous chunk of free space on disc, composed of one or more consecutive blocks
What is a File Allocation Table?
Keeps track of portions allocated to a file
What is a Disc Allocation Table?
Keeps track of blocks or portions which are free on the disc
What does each FAT entry contain for contiguous allocation?
- file name
- start block
- no.of blocks in file
What allocation is used for Contiguous allocation?
Pre-allocation
What is a benefit and disadvantage of Contiguous allocation?
Fast random access to blocks within a file but portions of wasted space appear as files are erased and others are inserted
What does each FAT entry contain for chained allocation?
Exactly the same as for contiguous allocation (file name, start block, no. of blocks in file)
What allocation is used for Chained allocation?
Dynamic allocation, each block contains a pointer to the next block and the previous
What is a benefit and disadvantage of Chained allocation?
No portions wasted but random access may be slow
How does Indexed Allocation work?
Each file contains an index block. This contains pointers to all other portions in a file. The index block indicates start block and length of each portion of the file
What does each FAT entry contain for Indexed Allocation?
- File name
- index block