Operating System Hard Disc (PPT 6) Flashcards
(42 cards)
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
What is a benefit and disadvantage of Indexed allocation?
Good random access speed and sequential access is easy but since blocks are spread everywhere, there is a head movement penalty
What are the three methods to keep track of free space?
- Bit Table
- Chaining free blocks
- Indexed free portions
What is a Bit table?
Disc Allocation Table is a binary number with one bit for each block on disc. If a block is full, its set to 1, if not 0. Disc Allocation Table can be very compact
How does Chaining Free Blocks work?
Treat free space as a file and use the same chaining method to link all free blocks together. DAT not actually required, only need a pointer to first block in the chain
How does Indexed Free Blocks work?
Treat free space as a file and use existing allocation method. DAT is simply the index block that we would store under Indexed Allocation. DAT can be very big when there is lots of free space
What does NTFS stand for?
New Technology File System
What is a Sector?
It is similar to a block, smallest physical storage unit on the disc, usually 512 bytes but not always
What is a Cluster?
Similar to a portion, one or more contiguous sectors. Does need to be contiguous in a file. Cluster size is always a power of 2