University of Helsinki Department of Computer Science
 

Department of Computer Science

Department information

 
Operating Systems S2006 / PART 3 (9.11.-8.12.)
Suomeksi In English
Files, disks and I/O

DEADLINE: Friday, December, 8.

o GOALS

Key words: I/O methods, device dependent and device independent I/O, file management, disk management

oMATERIAL

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:

 

o A - TEAM TASK

PART 1: FILE ACCESS

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?

o B - EVALUATION

Each team: Please evaluate your teams work as well as your own work using the following questions:

  • Brief description of you team process: how many times did you meet, how, what methods did you use, were all member participating actively?
  • Do you feel that this kind of team tasks were useful for your learning?
  • Would you like to keep them on the future course or omit them and use a different kind of project instead? Ideas?


Part 2 o

The only discipline that counts is self discipline.

Page created 26.09.2006, Tiina Niklander