MECH 2301 Lecture Notes - Lecture 24: Sequential Access, Management System
![](https://new-preview-html.oneclass.com/eGYVy4kJOE1BNEbxq546Q3MD7ngbxPrW/bg1.png)
MECH 2301 Lecture 24 Notes
Introduction
Indexed Access
• When a collision occurs, the system stores the additional record in an overflow area that
is reserved for this purpose.
• Once the logical record number is known, the file manager can locate the corresponding
physical record relative to the start of the file.
• If there is an integer-to-one relationship between the logical and physical blocks, this
calculation is almost trivial.
• Even at its most difficult, the translation requires nothing more than the use of a simple
mathematical formula P = int (L × SL / SP)
• Where P = the relative physical block number L = the relative logical block number SL =
the size in bytes of a logical block SP = the size in bytes of a physical block
• Once the relative physical record is known, the actual physical location is located using
information stored with the directory.
• Because physical records must be accessed a block at a time, the file manager provides
a memory buffer large enough to hold the physical record or records that contain at
least a single logical record.
• It then extracts the logical record from the buffer and moves it to the data area for the
program requesting access.
• Random access is also known as relative access, because the record number to be
accessed is expressed relative to the start of the file.
• Most modern file management systems provide a way for an application to access files
randomly.
• It is easy to simulate sequential access in a system that supports random access.
• The system simply reads the records in order.
• The reverse is not true.
• It is possible, but difficult, to simulate a random access file using sequential access.
find more resources at oneclass.com
find more resources at oneclass.com