0% found this document useful (0 votes)
88 views

Assignment On: File Concepts and Access Methods Submitted To: Maam Farheen Submitted By: Muhammad Awais Ajmal

This document summarizes file concepts and access methods. It defines a file as a named collection of related information stored on secondary storage. It describes file attributes like name, identifier, type, size. It discusses different file structures like text, source, and object files. It also explains different file access methods like sequential, direct/random, and indexed sequential access. Files can be accessed sequentially one after another or randomly by record number or index.

Uploaded by

Kashif Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views

Assignment On: File Concepts and Access Methods Submitted To: Maam Farheen Submitted By: Muhammad Awais Ajmal

This document summarizes file concepts and access methods. It defines a file as a named collection of related information stored on secondary storage. It describes file attributes like name, identifier, type, size. It discusses different file structures like text, source, and object files. It also explains different file access methods like sequential, direct/random, and indexed sequential access. Files can be accessed sequentially one after another or randomly by record number or index.

Uploaded by

Kashif Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Assignment on:

FILE CONCEPTS AND ACCESS METHODS


Submitted To:
MAAM FARHEEN
Submitted By:
MUHAMMAD AWAIS AJMAL
Roll No: 10

BSCS
6TH Semester

Session 2016-20

Department of Computer Science & IT

The Islamia University of Bahawalpur Pakistan


CONTENTS

 What is a File?

 Attributes of a File
 File Structure and Types

 File Access Methods


 References
What is a File?
A file is a named collection of related information that is recorded on
secondary storage such as magnetic disks, magnetic tapes and optical disks.

OR
A file is a sequence of bits, bytes, lines or records whose meaning is defined by
the files creator and user.

ATTRIBUTES OF FILE
Name: only information kept in human-readable form.

Identifier: unique tag (number) identifies file within file system

Type: needed for systems that support different types

Location: pointer to file location on device

Size: current file size.

Protection: controls who can do reading, writing, executing.

Time, date, and user identification: data for protection, security, and
usage monitoring.

Information about files is kept in the directory structure, which is maintained


on the disk.
File Structure and Types
 A File Structure should be according to a required format that the
operating system can understand.

A file has a certain defined structure according to its type.

 Text File

 Source File

 Object File

Text file is a sequence of characters organized into lines.

Source file is a sequence of procedures and functions.

Object file is a sequence of bytes organized into blocks that are


understandable by the machine.

A file can have various types of structure :

 Simple record structure :


 Lines
 Fixed length
 Variable length

 Complex Structures :
 Formatted document
 Relocatable load file
 Who interprets this structure?
 Operating system
 Program
Access Methods
 File access mechanism refers to the manner in which the records of a file
may be accessed.

There are several ways to access files :

 Sequential access

 Direct/Random access

 Indexed sequential access

Sequential Access
 A sequential access is that in which the records are accessed in some
sequence, i.e., the information in the file is processed in order, one record
after the other.

 This access method is the most primitive one.

 Example: Compilers usually access files in this fashion.

Direct/Random access
 Random access file organization provides, accessing the records directly.

 Each record has its own address on the file with by the help of which it can
be directly accessed for reading or writing.

 The records need not be in any sequence within the file and they need not
be in adjacent locations on the storage medium.

Indexed Sequential Access


 This mechanism is built up on base of sequential access.

 An index is created for each file which contains pointers to various blocks.
 Index is searched sequentially and its pointer is used to access the file
directly.

REFERENCES

1) https://www.studytonight.com/operating-system/file-system
2) https://www.geeksforgeeks.org/operating-system-file-access-
methods/
3) https://www.tutorialspoint.com/operating_system/os_file_system.
htm
4) https://www.youtube.com/watch?v=Zg-T2Zqq9YE

You might also like