Summary

Data are persistently stored on block devices but modified in RAM. This makes it necessary to synchronize the contents of both from time to time, and this chapter has introduced you to the corresponding methods. There are several system calls that allow for explicitly requesting that some portions of memory are written back to disk. Additionally, the kernel uses threads that perform the same job periodically to ensure that not too much modified data exist in RAM. While it is a good thing to keep disks busy, the kernel needs to ensure that not more information than the disk can handle is scheduled to be written back, and this chapter has discussed the techniques used to avoid congestion of the block layer. Additionally, some corrections are necessary for systems where power is scarce, and the policy changes in laptop mode have also been examined.

You have been introduced to all technical aspects of how data are shuffled back and forth between block devices and RAM by now. What is still lacking is the decision of which pages are supposed to be synchronized or discarded from RAM once the kernel gets short on memory, which is the subject of the next chapter.

Continue reading here: Page Reclaim and Swapping

Was this article helpful?

0 0