![]() ![]() So as you can see in this small diagram, everything that happens on your computer goes through RAM.It tries to buffer as much as data in order to create an efficient write request.Data won't be written immediately from RAM to hard disk, but to optimize write to the hard disk, Linux works with the concept of dirty cache.And if the user starts modifying data, it will go to RAM as well, and from RAM it will be copied to the hard disk, but that will only happen if the data has been sitting in RAM long enough.So the page cache stores recently requested data to make it faster if the same data is needed again. ![]() And while the information is copied from hard disk, it is placed in what you call the page cache.If a user is requesting information from hard disk, it is copied to RAM, and the user will be served from RAM.Here cache plays an important part of memory management on Linux as well.So the process information will be copied from RAM to CPU and the CPU will build its cache.There's very small amounts of cache on the CPU, because it's very expensive, and it's also not very useful for all the instructions.But to make it faster, the CPU has level one, level two, level three cache.For example, if we have a process which is loading, the process will first be loading in RAM and the CPU will get process data from RAM.Everything that is going to CPU will go through RAM.The central part of the computer is CPU and RAM is the front end portal to CPU.I will try to give you an overview on major areas and will help you understand important terminologies related to memory management in Linux. Linux memory management is a very vast topic and it is not possible to cover all the areas in single article. Different types of swapping scenarios and risks.Understanding Active and Inactive Memory.Understanding Translation Lookaside Buffers (TLB).How dirty pages are flushed or written back to disk?.What is the advantage of keeping page cache?.How does kernel perform disk read write operation?. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |