20091110 - File Systems The filesystem portion of an OS...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

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

Unformatted text preview: File Systems The filesystem portion of an OS organizes mass storage into files , which are named collections of data. Traditional re- sponsibilities are: Providing device independence . Implementing symbolic names for data. Checking access permissions . Guaranteeing file integrity . Supporting access methods (sequential, direct). Supporting file backup and recovery . Role of Filesystem in the OS The filesystem provides to application programs an abstract view of the mass storage devices. Device drivers present a logical unit/block view of devices. Filesystem presents abstractions files , directories , etc. The Filesystem Component of an OS Files and Directories Files are the basic objects implemented by the filesystem. Files are often organized into directories . The filesystem supports various operations on files: open prepare a file for access. close terminate file access. create make a new file. destroy delete a file. rename change the name of a file. read get data from a file. write put data into a file. File Types Some operating systems implement files of different types , such as: text a sequence of lines. binary uninterpreted bytes of data. executable binary machine code. Unix traditionally has had just one file type: a sequence of 8-bit bytes. There are advantages and disadvantages to each approach. Data and Metadata To implement the file and directory abstractions and support efficient access, the filesystem reserves some blocks on the storage device for various index structures and other infor- mation. Contents of the reserved blocks are called metadata . File contents are called simply data . The process of initializing index structures is usually called formatting . In-RAM and On-disk Data The OS usually caches (in RAM) information associated with currently active files. The master copy of the filesystem data and metadata is on the disk. Cached copies of active information are maintained in RAM. Opening a file usually brings information into RAM. Closing a file allows cached data to be released. The filesystem portion of the OS must ensure that changes made in RAM are eventually written back to the disk. The NACHOS Filesystem Stock NACHOS has two filesystem implementations: Stub filesystem , which uses the underlying OS filesys- tem to implement file operations. Real filesystem , which implements a rudimentary filesys- tem using the NACHOS disk device. Both filesystems are accessed through the abstract class FileSystem and the OpenFile interface. The FileSystem Class The FileSystem abstract class provides methods for creating, deleting and opening files....
View Full Document

Page1 / 55

20091110 - File Systems The filesystem portion of an OS...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online