Linux0.11 source code analysis-File System Management-high-speed buffer analysis

Source: Internet
Author: User

Actual physical memory: 1m---4m

Buffer Structure: buffer_head buffer header structure at the low end-buffer block at the high end

The size of the buffer block is the same as that of the Logical Disk;

Buffer Management: idle Buffer Queue (two-way loop list) and hashtable for management

The main functions are as follows: (1) the upper-layer read functions bread, breada, and bread_page are used to read the buffer block. The function parameters are the device number + the logical block number of the data on the device.

(2) search function of the buffer block: getblk mainly aims to search for the buffer blocks corresponding to the previous functions. The main return structure includes a Request Buffer block or an idle buffer block.

(4) The brelse function mainly releases the buffer block.

 

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.