Chapter 22. File Systems


A file system is a formal, structured way of organizing data on some sort of medium, like a disk. You want to be able to rapidly find the information you've put out there and access it efficiently . The format of the file system may depend on the type of disk, the speed of access, or the kind of data you have stored there. If you've got a disk full of video clips or sound files, it might be advisable to arrange them in contiguous files so the data transfer will be as fast as possible. If the disk is going to be used for a bulletin board or news system, you need to optimize it to handle lots of very short files that will be updated or replaced frequently. SunOS has various types of file systems that it understands, but from the top level they all look the same because of software layers that perform standard, common tasks in the same way for any file system type.

Most file systems are supported only on some sort of random-access device, like a disk. These are known as block devices, because they normally store and retrieve data in fixed-length chunks , or blocks. Hardware devices such as a tape drive cannot support a file system structure, since there is no way to locate a random block on the tape without starting at the beginning and reading sequentially through the tape until you find the data you want. (There actually was a form of tape that supported blocking, but it was a short-lived product. The medium was cheap, but the performance was much too slow.)

There are various methods of keeping track of data on a block device. Some are more efficient for certain purposes but perform very poorly under particular circumstances. The UNIX file system was designed originally to be simple and to support timesharing , where many users would probably access fairly short files on a pretty random basis. In fact, trying to keep files in contiguous disk blocks was of no benefit, since it was more likely that another disk request from an entirely different user would be made before the next disk block in the "contiguous" file was requested . This design, now known as UFS, for the UNIX File System, was enhanced by the University of California at Berkeley (the designers of the BSD UNIX releases) and eventually distributed as the Berkeley Fast File System, which is currently used on the Sun disks for both Solaris 2 and SunOS 4.x systems.



PANIC. UNIX System Crash Dump Analysis Handbook
PANIC! UNIX System Crash Dump Analysis Handbook (Bk/CD-ROM)
ISBN: 0131493868
EAN: 2147483647
Year: 1994
Pages: 289
Authors: Chris Drake

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net