On Github jangm / buffer-file-org-slides
while (1) { infile >> ch; if (infile.fail()) break; outfile << ch; }
Two buffers can be used to allow processing and I/O to overlap.
Multiple buffers can be used to allow processing and I/O to overlap.
Pool of buffers, Requests for a sector, O.S looks if sector is in some buffer, Brings sector to free buffer, If not LRU is used.
System & program buffers is used. Moving data from one place in RAM to another before they can be accessed, Unnecessary.
System or program buffer only, performs I/O directly between secondary storage and program buffer, System buffers handle all I/Os, program uses locations through pointer variable.