/    /  OS – File concept in OS

File concept in OS

 

What is the file?

The file can be explained as the smallest unit of storage on a computer system. The user can perform file operations like open, close, read, write, and modify. 

 

File concept

The operating system can provide a logical view of the information stored in the disks, this logical unit is known as a file. The information stored in files is not lost during power failures. 

 

A file helps to write data on the computer. It is a sequence of bits, bytes, or records, the structure of which is defined by the owner and depends on the type of the file.

 

Different types of files are:

 

  • Executable file

In an executable file, the binary code that is loaded in the memory for execution is stored. It is stored in an exe type file.

 

  • Source file

The source file has subroutines and functions that are compiled later.

 

  • Object file

An object file is a sequence of bytes used by the linker.

 

  • Text file

A text file is a sequence of characters.

 

  • Image file

An image file is a sequence of visual information, for example, vector art.

 

File Attributes

Some of the common file attributes are:

  1. Only the user can edit the name they have assigned to a file.
  2. A unique number tag is given to every file. It cannot be read by the user and is used by the file system to identify the file.
  3. The time, date, and user identification are maintained to access the information about which date the file was created, edited, or last accessed.
  4. The type of the file is easily identified.
  5. The size of the file in bits, bytes, or Kilobytes.
  6. Access control can be defined by the user, as to who can access the files to read, write, edit or delete the information stored in them.

 

File Concept in OS Reference