09. Filesystems

File
named data
  • that's all, really!
Filesystem (logical level)
organizing data on data storage with files:
  1. Identification (e. g. full path)
  2. Modes of usage (e. g. file read and write)
  3. Access rights
  4. Other file objects (directories, links etc.)
Filesystem (physical level)
organizing data on data storage with files:
  1. Naming and metadata
  2. File allocation
  3. Free space

Continuous files

If reading device positioning is actually slow, no need for speed optimization.

E. g.: magnetic band

block № 000
First file
  • file name/size
  • data
block № 012
Second file
  • file name/size
  • data
  • ..
  • block № 543
    Free space
    • Empty name / tail size

    Metadata is written on the sheet of paper, file is selected by manual winding or by traversing all the records (read header, speed winding to the next header atc.)

    Fixed-length metadata (directory) can be written at the start of the tape.

    Writing to the file is marking the file record «old» and creating a new one:

    block № 000
    First file
    • file name/size
    • data
    block № 012
    Free space
    • old file name/size
    • data
  • ..
  • block № 543
    Second file
    • file name/size
    • data
    block № 543
    Free space
    • Empty name / tail size
    Defragmentation
    turning scattered parts of data into continuous area

    MT needs free space defragmentation (just by copying actual files to empty tape).

    MT is useful for small number of files.

    File allocation table

    File is not continuous

    TODO more plan

    H/W

    HSE/ProgrammingOS/09_Filesystems (последним исправлял пользователь FrBrGeorge 2020-03-01 11:37:16)