MECH 2301 Lecture Notes - Lecture 35: Hard Disk Drive Performance Characteristics, Bit Manipulation, Linked List

92 views2 pages
MECH 2301 Lecture 35 Notes
Introduction
Linked list method
A bitmap is usually kept in memory for fast access.
The bitmap method is an economical way of keeping track of free space
Since only one bit is needed for each block on the disk. It has the further advantage that
it is easy for the file manager to locate contiguous blocks or blocks that are nearby to
those already allocated to a file.
This allows the file manager to maintain files in a way that can minimize disk seek during
file access.
Although the bitmap must be stored 8 bits to a byte, CPU instruction sets provide bit
manipulation instructions that allow efficient use of the bitmap.
One disadvantage of the bitmap method is that there is some processing overhead in
returning space from a large file with many blocks to the free space list.
A second disadvantage is that once space has been returned to the bitmap, it may be
immediately reassigned.
There is no way of determining the order in which the space was returned.
Therefore, the space used by a deleted file may be reused again immediately,
eliminating the chance for file recovery.
An alternative method maintains all the free space on the disk in a linked list.
A pointer to the first free block is kept in a special location on disk and also in memory.
Each free block is then linked to the next.
The file manager allocates blocks from the beginning of the list.
The blocks from deleted files are added to the end of the list.
This method has considerable overhead in disk seeks if a large number of blocks are to
be allocated, but is simple and efficient for small numbers of blocks.
find more resources at oneclass.com
find more resources at oneclass.com
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents