Operating System

File Access Methods

File Access Methods

The way that files are accessed and skim into memory is decided by Access methods. Usually, one access method is carried by machine while there are OS's that support multiple access functions.

1. Sequential Access

information is located one record right after another is an order.

Read command begin a pointer to change its position ahead by one.

Write command assigns space for the account and move the pointer to the new Head Of the current File.

Such a way is cheap for tape.

2. Direct Access

This method is beneficial for disks.

The file is viewed as sorted in an increasing sequence of blocks or records.

There are not any limitations on which blocks are read/written, it is frequently done in any order.

The user now states, "read next".

"n" may be a number relative to the start of the file, not relative to an absolute physical disk location.

3. Indexed Sequential Access

It is created on top of Constant access.

It uses an Index to regulate the pointer while accessing files.

What is a Directory?

Information about files is maintained by Directories. A directory can contain multiple files. It can even have directories inside them. In Windows, we also call these directories folders.

 

Given is that the information maintained during a directory:

 

Name -The name visible to the user.

Type: sort of the directory.

Location: Device and site on the device where the file header is found.

Size: Number of bytes/words/blocks within the file.

Position : Current next-read/next-write pointers.

Protection : Access control on read/write/execute/delete.

Usage: Time of production, access, alteration etc.

Mounting: When the basis of 1 filing system is "grafted" into the prevailing tree of another filing system it's called Mounting.