Allocation Methods
An allocation method refers to how disk blocks are
Linked allocation
Indexed allocation
Contiguous Allocation
Each file occupies a set of contiguous blocks on
the disk
Simple only starting location (block #) and length
problem)
File can not grow. External Fragmentation
Linked Allocation
Linked Allocation
Each file is a linked list of disk block; the disk blocks may be
the file.
For example, a file of five blocks might start at block 9,
continue at block 16, then block 1, block 10 and finally block 25.
Each block contains a pointer to the next block. These pointers are not made available to the user. To create a new file, we simply create a new entry in the
directory.
With linked allocation, each directory entry has a pointer to
allocation, and any free block on the free space list can be used to satisfy a request.
The size of a file does not need to be declared
are available.
Consequently, it is never necessary to compact
disk space.
beginning of that file and follow the pointers until we get to the ith block.
Another disadvantage to linked allocation is the
Indexed Allocation
Brings all pointers together into the index block. Logical view.
index table
Index Allocation
All the pointers are brought together into one location : Index
Block.
Each file has its own index block, which is an array of disk-block
addresses.
The ith entry in the index block points to the ith block of the file. The directory contains the address of the index block. To read the ith block, we use the pointer in the ith index-block
external fragmentation, because any free block on the disk may satisfy a request for more space.
The pointer overhead of the index block is generally greater
Symbolic Link
A link is effectively a pointer or an alias to another
file or subdirectory. For example, a link may be implemented as an absolute or relative path name (a symbolic link).
When a reference to a file is made, we search the
directory. The directory entry is marked as a link and the name of the real file (or directory) is given.
We resolve the link by using the path name to
locate the real file. Links are easily identified by their format in the directory entry.
A symbolic link can be deleted without deleting the
Distributed-File Systems
Distributed
file system (DFS) a distributed implementation of the classical time-sharing model of a file system, where multiple users share files and storage resources. sharing when files are physically dispersed among the sites of a distributed system.
DFS Structure
Service software entity running on one or more
machine
Client process that can invoke a service using a
objects
Multilevel mapping abstraction of a file that
hides the details of how and where on the disk the file is actually stored
A transparent DFS hides the location where in the
mapping returns a set of the locations of this files replicas; both the existence of multiple copies and their location are hidden
Naming Structures
Location transparency file name does not reveal
File Replication
Replicas
file
reside
on
failure-
users.
The main problem associated with replicas is their
update.
From a users point of view, replicas of a file denote
the same logical entity and thus an update to any replica must be reflected on all other replicas.
End of Chapter