OS Review Chapter 11:File System Interface

Chapter 11 : File System Interface

File Concept

Contiguous logical address space

Types:

  • Data :numeric character binary …
  • Program

File Structure

File Attributes(屬性)

Name Type Location Size Protection Time, date, and user identification

Information about files are kept in the directory structure, which is maintained(維護) on the disk.

File Operations

Open(Fi) –search the directory structure on disk for entry Fi, and move the content of entry to memory

Close (Fi) –move the content of entry Fi in memory to directory structure on disk

Access Methods

  • Sequential Access
  • Direct Access

Directory Structure

disks are split into one or more partitions,each partition contains information about files within it.

The information is kept in entries in a device directory or volume table of contents

Organize the Directory

Efficiency Naming Grouping

  • Single-Level Directory

  • Two-Level Directory

  • Tree-Structured Directories

  • Acyclic-Graph Directories 非循環圖

    How do we guarantee no cycles?

    Allow only links to file not subdirectories.

    Garbage collection.

    Every time a new link is added use a cycle detection algorithm to determine whether it is OK.

File System Mounting 掛載

A file system must be mounted before it can be accessed.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章