OPERATING SYSTEMS Disk Concepts PLEASE SHOW YOUR WORK IM TRY
OPERATING SYSTEMS: Disk Concepts
PLEASE SHOW YOUR WORK! I\'M TRYING TO UNDERSTAND HOW TO ACTUALLY DO THE PROBLEM.
6. If there is an error on the disk sector, what kind of methods can be used to solve the problem? Give two approaches and discuss the relative advantages and disadvantages of them.
7. Discuss the reasons why the operating system might require accurate information on how blocks are stored on a disk. How could the operating system improve file system performance with this knowledge?
8. An index block size is 32 bytes with 4 bytes (a word) pointer and the data block size is 512 bytes. How many indexes in a single index block? What is the maximum possible file size to index?
9. An index block has 4 bytes (a word) pointer and the data block size is 2KB. What is the index block size to support 4GB maximum possible file size?
10. In the combined index scheme (like UNIX inode) with 10 pointers (6 direct, 2 indirect, 1 double indirect, and 1 triple indirect), what is the maximum possible file size to be indexed (the block size is 1024 B and each sub index block has 100 pointers)?
11. Assuming we use a bit vector for the free space management, how many bits will be needed to maintain 1 TeraB disk with 4KB block size?
Solution
6)
An important function of the file system is to manage space on the secondary storage, which includes keeping track of both disk blocks allocated to files and the free blocks available for allocation.
The main problems in allocating space to files are:
1. effective utilization of disk space
2. fast accessing of files
Management of disk blocks is a familiar problem that we have encountered and discussed in relation to main-memory management. But, secondary storage introduces two additional problems:
1. slows disk access time and
2. larger number of blocks to deal with
In spite of that, many considerations are similar to both environments, particularly, contiguous and non contiguous allocation of files. Three widely used allocation techniques are contiguous, linked and indexed. The last two belongs to non contiguous allocation of files. Each method has its advantages and disadvantages.
While discussing those allocation strategies we will consider that a file is a sequence of blocks. All I/O operations on disk occur in term of blocks. The conversion from logical records to physical blocks is done by the software.
7) disk blocks can be assigned to filesin many ways such as
-optimised latency
-increased thoughtput
1 Improvement of Reliability via Redundancy
- Improvement in Performance via Parallelism
11)
