5.4. File System Services

5.4.1. Types of File Access Sequential Access


Most files are accessed in linear manner from the beginning. It is possible to repositon (seek system call) the current file position pointer. Direct Access


File systems that are optimized for use with data bases are accessed in terms of records rather than a byte sequence.

5.4.2. Permissions


An import attribute of files is their set of permissions.

5.4.3. File Descriptors


The set of open files for each process is tracked in the process control block (PCB).

5.4.4. System Calls

  • Create a file
  • Delete a file
  • Open a file
  • Close a file
  • Read data from a file
  • Write data to a file
  • Reposition the current file pointer in a file
  • Append data to the end of a file
  • Truncate a file (delete its contents)
  • Rename a file
  • Copy a file

5.4.5. Directory Trees


The notion of directories allows files and directories to be organized in a tree like manner.

5.4.6. Path Names

An absolute path name begins at the root and specifies each step down the tree until it reaches the desired file or directory.

A relative path name begins from the current working directory.