|
![Suomeksi](/gif/hy/flag-fi-25x21.gif)
![In English](/gif/hy/flag-uk-25x21.gif)
DEADLINE: Friday, December, 8.
GOALS
- To study the basic principles of I/O and buffering and to get familiar with directory and file management and the duties of the OS when a process uses files.
Key words: I/O methods, device dependent and device independent I/O, file management, disk management
MATERIAL
- Course Book: Stallings. Operating Systems, Chapters 11-12
- See also Stallings's pages If you need to have English slides that are based on this book. You can find them from the 'instructor resourses' link.
Other materials: A.S. Tanenbaum: Modern Operating Systems. 2nd ed. 2001. Sections 5-6, pages 269-452. Also in Kumpula Library, 2nd floor.
The submitted report can be hand written (but clear enough), but we prefer them to be edited in computer. It does not have to be an essay, but it needs to form a continuous 'story'. Do not forget to explain the details: who is doing (OS / HW), why and when, etc ...The report must contain:
- Cover page, with participant names, number and teacher of the
small group session
- The actual 'essay
or report' of the section problem, both parts
- Self-evaluation part
This time the process needs to access file JEMMA. Actually the process wants to read only one byte from the file. However, it does not want to read the first byte, but 2152nd byte. Please describe in your report, using the detail level of the course book, all the features and parts of operating system, hardware and file sytems, which particiapte in fulfilling the process's task. Describe also what happens in the system, when it servers the process's request. The process may open and close the file implicitly or explicitly. You must choose one model and justify your selection. Explicit file opening means that the process must before accessing the file open the file using a specific system call. When the system uses implicit file opening, the operating system opens the file when process makes first access to it. For this the process can use any available system call. Please remember also to explain the directory structure you use. Describe how it is used in the file opening and maintaining the access control information. The file JEMMA is stored on an old-fashioned, but simple, file system that uses File Allocation Table (FAT). A FAT file system considers the disk to be a queue of continuously numbered blocks. The numbering starts from the outermost track. First you number all the sectors in the outermost track and then continue track by track numbering all sectors in each track. This block number can be thought of as the index to a one-dimensional array, where the elements are the blocks. The specific disk, where the file JEMMA is located, has two surfaces (numbered as 0 and 1). Both surfaces have 80 tracks (numbered from 0 to 79.) Track 0 is the outermost track. Each track is divided to 18 sectors (numbers 1 to 18). The size of one sector and one block is the same, 512 bytes. The first sector is reserved for the Master Boot Record, 18 sectors have been reserved for the file allocation table including its backup, and 14 sectors for the root directory. These sectors are all reserved from the beginning of the disk. The file allocation is done using chained allocation. The directory contains the file name, file attributes and the number of the file's first block. All the other block can be found from the file allocation table following the links stored there. The first block of File JEMMA is block number 44, and the content of the file allocation table is: 43: 44: 45 45: 46 46: 50 47: 48: 49: 50: 51 51: 52 52: 60 During your explanation make sure that you also explain where (surface, track, sector) the byte 2152 can be found. Take extra care to explain how this information travels between the operating system and the disk itself.
PART 2: DISK FAILURES Failures on a disk are not unexpected, they happen more or less regularly and each disk fails eventually some day. Different file systems handle the failures differently. Concider what happens in a) a FAT file system or in a )ext3fs file system, when the Free Block List or BitTable is lost due to some failure? Can the disk still be used safely, what can be done to recover the list? Is it still safe to read or write on the disk? What happens if the disk failure appears only in one sector that is part of one file? |
Each team: Please evaluate your teams work as well as your own work using the following questions:
|
![o](/u/ahakkine/l-hand.gif)
|