This scheme is called memorymapped io on other

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ed by using the information in index block. The method, however, has the following drawbacks: 1. It suffers from wastage of disk space especially when most files are small. This is because each file is allocated one index block irrespective of the number of data blocks allocated to the file. Hence if a file has one or two data blocks, an entire index block is used for storing just one or two pointers, leaving the index block area largely unused. One way to take care of this problem is to have enough space in the directory so that the first few (say n) block addresses can be stored in the directory itself. So for small files, all the necessary information is right in the directory. An index block is allocated for a file only when the file requires more than n blocks for storing its data. 2. It suffers from the problem of handling very large files. This is because if the index block has space that is sufficient for storing only m disk block addresses, then how can we store files whose size is larger than m disk blocks? This problem is often taken care of by using the method of multilevel index. In this method, one of the addresses in the index block is the address of a disk block called the secondlevel index block. This block contains pointers to additional disk blocks allocated to the file. This approach could be continued to a third or fourth level, but two levels of indexes are generally sufficient. DEVICE MANAGEMENT For processing data, a computer must first input data and programs for which it needs input devices. Similarly, to produce the results of processing, it needs output devices. Chapter 9 provided a description of several of these I/O devices. The device management module of an operating system takes care of controlling all the I/O devices of a computer system and provides a simple and easy to use interface to these devices. How these requirements are taken care of by an operating system is described below. Controlling I/O Devices We saw in Chapter 9 that device controllers are used for connecting I/O devices to a computer system. Each device co...
View Full Document

Ask a homework question - tutors are online