Skip to content

Chapter 10: File-System Interface

:material-circle-edit-outline: 约 217 个字 :material-clock-time-two-outline: 预计阅读时间 1 分钟

ch10 File System Interface(1).pdf 操作系统(本)2024-12-12 第 7-8 节

File-System 负责管理外存

image-20241214131249550

File Concept

A file is a sequence of bytes stored on some device

Access Methods(文件的访问方法)

Sequential Access (顺序存取)从头到尾一个个找

Direct Access (直接存取),先定位到一个地方,再对这个地方进程操作

Indexed sequential-acess

Directory Structure(目录结构)

Directory Structure

A collection of nodes containing information about all files

image-20241214132711669

Disk Structure

Disk can be subdivided into partitions(分区)

Entity containing file system known as a volume

Each volume containing file system also tracks that file system’s info in device directory or volume table of contents

image-20241214132837885

Single-Level Directory(单级目录)

A single directory for all users

image-20241214132938648

Two-Level Directory(二级目录)

Separate directory for each user

image-20241214132950641

进一步的,我们可以得到 Tree-Structured Directories(树型目录)

Acyclic-Graph Directories 无环图结构目录

Have shared subdirectories and files -> Two different names (aliasing)

image-20241214133205729

File System Mounting

A file system must be mounted before it can be accessed

File Sharing

Protection