File System in Operating System

File System in OS

A set of OS Services that provides Files and Directories for user applications is known as file system manager.

File:-A named, ordered collection of information.

File System:-A set of files and directories contained on a single drive. The raw data on the drive is translated to this abstract view of files and directories by the file system manager according to the specification of the file system standard.

The file manager administers the file system by:

  1. Storing the information on a device
  2. Mapping the block storage to a logical view
  3. Allocating/deallocating storage
  4. Providing directories

File Operations:-

  • Creating a file
  • Writing a File:-To write a file, we make a system call specifying both the
    name of the file and the information to be written to the file
  • Reading a File
  • Repositing withing a file
  • Deleting a File
  • Truncating a File

Types of File

File System in OSGeneral ExtensionFunction
Executableexe, com, binRead to run machine language program
Objectobj, oCompiled, machine language not linked
Source CodeC, java, pas, asm, aSource code in various languages
Batchbat, shCommands to the command interpreter
Texttxt, docTextual data, documents
Word Processorwp, tex, rrf, docVarious word processor formats
Archivearc, zip, tarRelated files grouped into one compressed file
Multimediampeg, mov, rmFor containing audio/video information

File Attributes:-

File Attributes in OSTypesOperations
NameDocCreate
TypeExeOpen
SizeJpgRead
Creation DataXisWrite
AuthorCAppend
Last ModifiedDateTruncate
protectionclassDelete
  • 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

Please Login/Signup to comment