Home > Common Problem > What does file system mean?

What does file system mean?

藏色散人
Release: 2020-09-12 15:15:23
Original
29287 people have browsed it

What does file system mean?

What is the file system?

File system is the method and data structure used by the operating system to identify files on storage devices (commonly disks, but also solid-state drives based on NAND Flash) or partitions; That is, a method of organizing files on a storage device.

The software organization responsible for managing and storing file information in the operating system is called the file management system, or file system for short.

The file system consists of three parts: the file system interface, a collection of software for object manipulation and management, and objects and attributes. From a system perspective, the file system is a system that organizes and allocates the space of file storage devices, is responsible for file storage, and protects and retrieves stored files.

Specifically, it is responsible for creating files for users, storing, reading, modifying, and dumping files, controlling file access, and revoking files when the user no longer uses them.

Function

1. The file system is the method and data structure used by the operating system to identify files on the disk or partition; that is, the method of organizing files on the disk . Also refers to the disk or partition used to store files, or the type of file system. Therefore, it can be said that "I have 2 file systems" means that he has 2 partitions, one to store files, or he uses an "extended file system", which means the type of file system.

2. The difference between the disk or partition and the file system it contains is very important. A few programs (including most legitimately those that generate file systems) operate directly on the raw sectors of a disk or partition; this may corrupt an existing file system. Most programs operate based on file systems and cannot work on different file systems.

3. Before a partition or disk is used as a file system, it needs to be initialized and the record data structure written to the disk. This process is called creating a file system.

4. Most UNIX file system types have a similar general structure, even if the details vary. The central concepts are superblock, i-node inode, data block, directory block, and indirect block indirection block. The superblock contains general information about the file system, such as size (its exact information depends on the file system). The i-node contains all information about a file except the name. The name is stored in the directory together with the number of i-nodes. The directory entry includes the file name and the number of i-nodes of the file. The i-node contains the number of several data blocks used to store the file's data. There is only space for a small number of data blocks in the i-node. If more are needed, pointer space pointing to the data blocks will be dynamically allocated. These dynamically allocated blocks are indirect blocks; in order to find the data block, the name indicates that it must first find the indirect block number.

5. UNIX file systems usually allow holes in files, which means that the file system pretends that there is a special location in the file with only 0 bytes, but does not reserve actual disk space for this location in the file. This happens frequently with small binaries, Linux shared libraries, some databases and some other special cases.

6. Holes have certain uses. On my system, a simple measurement tool showed a savings of about 4MB out of 200MB of disk space used due to holes. In this system, there are relatively few programs and no database files.

7. The functions of the file system include: managing and scheduling the storage space of files, providing the logical structure, physical structure and storage method of files; realizing the mapping of files from identification to actual addresses, and realizing file control operations and Access operations realize the sharing of file information and provide reliable file confidentiality and protection measures, and provide file security measures.

8. The logical structure of the file is to organize the file structure according to the logical relationship of the content of the file. The logical structure of files can be divided into streaming files and recorded files.

9. Streaming file: The data in the file is a stream of characters without structure.

10. Record file: It is composed of several logical records, and each record is composed of the same data items. The length of the data items can be determined or uncertain.

Main defects: poor data association, data inconsistency, and redundancy.

The above is the detailed content of What does file system mean?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template