I/O Stream exercises and interview questions-blog Park: Holding, holding, I/O questions

Source: Internet
Author: User

I/O Stream exercises and interview questions-blog Park: Holding, holding, I/O questions

1. What is a buffer?

A: It is much slower for a computer to access external devices or files than to directly access the memory. If you call the read () or write () method to access external devices or files each time, the CPU spends the most time waiting for external devices to respond, rather than processing data. To this end, to open up a memory zone of the memory buffer, each time the program calls the read () method or write () method, it reads and writes in the buffer zone. When the buffer zone is full, the system only writes the content of the buffer zone to an external device at a time or reads it to the CPU. The memory buffer can effectively improve the CPU usage and the efficiency of the entire computer system.

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.