Linux file Systems (1)

Source: Internet
Author: User

First introduce two noun bar, user space, kernel space

We know that each process has its own living space, and that the process is divided into two types of space:

user space, kernel space

The operating system, by setting the program State Register to a different operating mode, is the user mode and the system

To restrict access to system resources by user processes and system processes.

User mode works in user space and system mode works in kernel space.

Only user instructions can be run under User space and only the specified registers and memory areas can be accessed.

However, in kernel space, the process can run all the instructions of the system.

You must switch to kernel mode to deal with hardware.

The functionality provided by a kernel is provided by a system call. (e.g. open files, read files, etc.)

There are many file systems in Linux, each of which provides its own system call or interface, in order to solve this problem.

In order to solve this problem has the VFS.

Vfs:virtual FileSystem (virtual file system)

The virtual file system is also a function of the kernel.

With VFS, the user only needs to invoke the interface provided by the VFS, without concern that the partition to be accessed on disk is

What kind of file system. The conversion work will be done by the virtual file system.

Remember: You must switch to kernel mode to deal with hardware.

kernel mode and kernel space or user mode and user space are generally not differentiated.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6E/82/wKiom1V-gfagu2--AAB1SmI0WOI459.jpg "title=" 7.PNG " alt= "Wkiom1v-gfagu2--aab1smi0woi459.jpg"/>


Say the file system type:

Ext3, Ext4, ext2 (extended file system)

Reiserfs

iso9660 (CD), swap (swap partition), CIFS (Window Network file system), NFS (Linux Network File system)

XFS, JFS

OCFS2 (clustered file system), FGS2

FAT32, NTFS


Talking about the common block size,

Block size:1024 (1 K), 2048, 4096 byte

Let's talk about disk space:

The disk is divided into block groups:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6E/83/wKiom1V-jd-Rua7ZAACH9vPjR0U401.jpg "title=" 8.PNG " alt= "Wkiom1v-jd-rua7zaach9vpjr0u401.jpg"/>

Super Blocks: Super Block (Stores information: How many groups, each fast group contains how many blocks, block size, free disk blocks,

Idle inode, referencing Inode)

GDT (Block group descriptor): where each block group starts, ends, blocks group names, and so on.

The NO. 0 block of a partition is a boot block that cannot be used, which can store bootloader.

Not every block group contains super block.

The default is to find the Super block of the NO. 0 block group.

The MBR does not belong to any partition .


Linux file Systems (1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.