Understand the operating system file system 1--

Operating system is the most important of the three abstractions: processes (threads) , address space , file ;

 

Any computer program needs to store and retrieve information;

First thought was to use its own address space using the stored information;

But there are some problems: the limited size of the virtual address space, information can not persist, information sharing is not convenient;

All in all, there is information dependent process is inconvenient;

 

A better approach is long-term storage medium for storing information using nature - presented here is disk .

As long as support for disk read and write operations, you can solve the problem of long-term storage, and as long as a large enough disk space size limit is not a problem. But also to support the needs of different processes (threads) concurrent access.

 

But there are some problems to be solved:

1) How to find the information you want;

2) how to prevent a user to read another user's data;

3) How do we know that space is free;

 

Here the use of a new abstraction for disk to solve this problem - file ;

=====================================================

File is an abstract concept, is a logical concept. Information is the process of creating a logical unit.

Documents can be some actions: open, close, add, delete, modify;

File management by the operating system, to achieve the above operation is an important part of the operating system design.

Part of the operating system with files is called file system .

 

From the user perspective: file in the user's eyes manifestation of what constitutes and how to name the file, how to protect files, which can operate on file;

From the perspective of the designer: How to record free memory area (bitmap list), a logical block number of disk sectors, etc.

====================================================

User-level content - files, directories

 

====================================================

Designers level of content - for file systems, file system management and optimization

 

====================================================

 

Guess you like

Origin www.cnblogs.com/grooovvve/p/11448500.html