Inode and file Descriptor differences

Source: Internet
Author: User

The inode or I node refers to the index of the file. such as a system, all files are placed on disk or flash, it is necessary to compile a directory to explain where each file, what properties, and size. Like a catalogue of books, it is easy to find and manage. This directory is required by the operating system and is used to locate files or to call management files. Many operating systems use this concept, such as Linux, some embedded file systems, and so on. Of course, there are many I nodes for a system. So the I node itself is to be managed.

In Linux, the kernel finds each file through the Inode, but a file can be opened by many users at the same time or opened multiple times by a single user. There is a problem with how to manage the current displacement of a file, because it is possible for each user to open the file after the operation is different, so that the amount of file displacement, there are some other problems. So Linux has also made a file descriptor (Files descriptor) This thing, to serve each user separately. Each time a user opens a file, a file descriptor is generated and multiple file descriptors are opened multiple times, one for each user, or multiple users. The file descriptor records data such as the offset of the currently open file. So an I node can have 0 or more file descriptors. Multiple file descriptors can correspond to an I node.

Inode and file Descriptor differences

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.