WHAT IS A COMPUTER FILE?

File is defined as collection of related data that is stored on the secondary storage devices . user stores his or her data inform of a file. Computers understand only physical memory areas where a user understands to access files only by its names. Data in file could be image, text, video, audio, etc.

On generally cutting edge working frameworks, indexes are ordered into one-dimensional exhibits of bytes. The configuration of a record is characterized by its substance since a document is singularly a holder for information, despite the fact that, on a few stages the organization is as a rule demonstrated by its file name growth, detailing the tenets for how the bytes must be arranged and translated astronomically.

File is actually a physical memory area for an operating system to store the data but for user it is a logical place. Any file in computer system has two parts first is name and extension. An extension indicates application from which file is to be opened. For example .c  file then OS understands it should opened in turbo c.

 ATTRIBUTES OF FILE

  • NAME

Name is used to identify file and this attribute is specified by creator of a file .

  •  IDENTIFIER

Operating system assigns a unique identifier to a file.

  • TYPE

This attribute specifies what kind of file is it. For example HTML file.

  • LOCATION

Location refers to the place where file is stored on hard disk/

  • SIZE

Size means amount of information contained in the file.

 

FILE SYSTEM MANAGEMENT IN OS

 

OPERATIONS ON FILE

  • CREATION OF A FILE

To create a file there should be space in memory and there must an entry for new file in directory.

  • WRITING DATA ON A FILE

Once file is created user can write data on a file. While performing write operation on a file a system call is made which  information which needs to be written in file and the name of that file. The system finds out the directory entry is done. It is necessary to store a pointer to the end of the current file. Using this pointer, the address of next block can be easily calculated.

READING FILE

Read operation reads data from a file. A system call is made which specifies the name of a file and location of the next block of the file where information should be written. Again the directory is searched where file is located.

TYPES OF A FILE

  1. SIMPLE  FILE:  this is normal type of  a file which contain user  information.
  1. BASIC FILE: these files are used for storing information of a file system
  1. CHARACTER SPECIAL FILE: these files are related to peripheral and used to model  serial  I\O devices.
  1. BLOCK SPECIAL FILE: these types of a file are used to model disks.

FILE ACCESS METHODS

  • SEQUENTIAL  ACESS

This is simplest scheme among. When attempt is made to read file read head sequentially seeks blocks.

  • DIRECT ACCESS

Direct access files allows the block size to be separately defined for each file.

Written by Sourabh Bhunje

Sourabh Bhunje, B.E. IT from Pune University. Currently Working at Techliebe.Professional Skills: Programming - Software & Mobile, Web & Graphic Design, Localization, Content Writing, Sub-Titling etc.http://techliebe.com/about-us

Leave a Comment