13.07.2015 Views

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

An Operating Systems Vade Mecum

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Access methods 207Instead of submitting subsequent requests to read or write, the process treats thefile as part of virtual store. To close the file, the process needs only to submit aReleaseSegment service call.None of the file itself needs to be brought into main store at first. Instead, as theprocess accesses the new segment, it will generate address-translation faults. The storagemanager will convert these faults into requests on the file manager to bring in more of thefile.3.4 Structured filesDirect access requires the application program to compute where it wishes to seek in thefile. This computation may be based on data stored elsewhere in the file, or it may bebased on some secondary file that maintains indices into the main file. Database applications,which we will discuss shortly, often wish to seek to the part in the file thatcorresponds to some record, as identified by the value of some key field in the record.For example, a file might contain data about all the students at a university. Eachstudent’s data could be stored in a single record, with fields for name, year in school,grade-point average, mailing address, and a list of all the courses the student has taken.<strong>An</strong> application program might wish to examine records only of second-year students. Inthis case, the year-in-school field is a key to the file. <strong>An</strong>other application might wish toexamine records of students with straight A averages. Here, the running grade-pointaverage field is treated as a key.A few operating systems allow the owner of a file to declare that the file should bestructured. Part of structuring a file is declaring what the records look like. In particular,the fields that will be used as keys must be described. Writing into the file is limitedto placing new records into the file and modifying or deleting old ones. Reading the filerequires specifying the keys and key values that the file manager should search for. Successiveread operations yield successive records that satisfy the current search pattern.The records themselves might not have any particular order. OS/360 (and its descendants)provides structured files of several kinds. One example is ISAM (IndexedSequential Access Method), which uses a two-level tree to access records indexed by asingle key. VMS provides a record-management tool that includes a language fordescribing the structure of files and a set of routines that programs can use to access thestructured files.3.5 DatabasesA database is a collection of structured, interrelated data, usually managed by utility programsthat perform queries and updates. These programs, which are called databasemanagement systems, provide for complex searches that may involve a number of relatedfiles. For example, finding the home phone number of all students who are majoring incomputer science and have a grade point average of at least 3.5 may require reference to

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!