0% found this document useful (0 votes)
5 views

file system & optimization

The document discusses file storage strategies on disk, emphasizing the importance of disk space management and the trade-offs between consecutive byte allocation and block allocation. It highlights the need for backups, various backup types, and techniques to improve file-system performance such as caching and defragmentation. Additionally, it outlines the challenges of file access methods and the impact of disk access time on system efficiency.

Uploaded by

balu30968
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

file system & optimization

The document discusses file storage strategies on disk, emphasizing the importance of disk space management and the trade-offs between consecutive byte allocation and block allocation. It highlights the need for backups, various backup types, and techniques to improve file-system performance such as caching and defragmentation. Additionally, it outlines the challenges of file access methods and the impact of disk access time on system efficiency.

Uploaded by

balu30968
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

 Files are normally stored on disk, so management of disk space is a major concern

to file-system designers.
 Two general strategies are possible for storing an n byte file:
a)n consecutive bytes of disk space are allocated.
b)file is split up into a number of contiguous blocks.
 The same trade-off is present in memory-management systems between pure
segmentation and paging.
 In this method, one word in each block is used as a pointer to the next block.
 The entry for this file in the user level directory is a pointer to the first block of
the file.
 Though the implementation of this method seems to be simple , it has a specific
disadvantages, which is a large number of disc accesses needed to find the end
of the file.
 Since each block points to only the next block all the blocks needs to be passed
through to arrive at the end of the file.
 The linking methods we have seen previously suffer from the main demerit in
that they require more number of disk accesses to arrive at a specific block
since the file access method must be sequential.
 More number of disk accesses means more number of head movements and
corresponding rotational delays.
 This demerit can be overcome if the file access can be random.
 This can be achieved with the help of index blocks which are used to store the
linkage pointers for each file.
 The size of each index block is limited and hence a large file might require
many blocks , which are linked together.
 Choosing a proper block size is an important function of disk management .
 The most commonly used block sizes are 512 , 1k and 2k bytes.
 The block size and the sector size need not be the same.
 If the sector size is 2k bytes then always 2 consecutive sectors are read from the
disk and are treated as a single unit.
 If a computer’s file system is irrevocably lost, whether due to hardware or
software, restoring all the information will be difficult, time consuming, and in
many cases, impossible.
 Backups allow files that were removed days, even weeks, ago to be restored
from old backup tapes.
 Backups to tape are generally made to handle one of two potential problems:
(1) Recover from disaster.
(2) Recover from stupidity
 Full backup - Preserves the whole system.

 System backup - Preserves system directories and files. Must include backup/
restore tools.

 Data backup - Preserves user data.


 Tape drive - Large capacity, fast requires new tapes regularly.

 CD-R, CD-RW, DVD - Cheap but relatively slow.

 (Removable) Hard disk - Fast but expensive.


PHYSICAL DUMP
 LOGICAL DUMP
 UNIX – fsck (File system consistency check)
 Windows – sfc (System file checker)
 BLOCKS
 FILES
 The most common technique used to reduce disk access time is the block
cache or buffer cache.
 Cache can be defined as a collection of items of same type stored in a hidden
or inaccessible place.
 The most common algorithm for cache works in such a way that if a disk access
is initiated , the cache is checked first to see if the disk block is present.
 Another technique to improve file-system performance is to try to get blocks
into the cache before they are needed to increase the hit rate.
This works only when files are read sequentially.
When a file system is asked for lock ‘k’ in the file it does that and then also
checks before hand if ‘k+1’ is available if not it schedules a read for the block
k+1 thinking that might be of use later.
• Another way to increase file-system performance is by reducing the disk-arm motion
by putting blocks that are likely to be accessed in sequence close to each other ,
preferably in the same cylinder.
 Defragmentation is a technique that puts all related data together pertaining to a
file.
 Whenever we delete a temporary file from our hard disk a storage area on the
disk becomes free for reuse again.
 The next time we save a file and uses its free area to store as much of the files as
fit.
 As we delete old files and insert new files over a period of time , they begin to be
distributed on the hard disk as a piece here and there and somewhere else.
 It tends to slow file accessing because the system has to go to several locations to
pick up one file .
 We can speed up the hard disk response time by running the DDP (Disk
Defragmenter program).
 This program rearranges the files so that all parts of a files are stored together in
one location.
 Large sections of free space are also put together.
 So we can improve the performance of our computer by defragmenting our hard
disk.
1. Select the search bar on the taskbar and enter defrag.
2. Select Defragment and Optimize Drives.
3. Select the disk drive you want to optimize.
4. Select the Optimize button.

You might also like