In the previous video in our virtual memory series, we discussed demand paging. But that was mostly theoretical, explaining how demand paging works inside the Linux kernel and the mechanisms through which it handles page faults. In this follow-up video, we make it more concrete by learning to inspect the virtual memory of a running process to see demand paging in action.
If you watch this video, you will learn a few cool things:
What is demand paging (the compressed version; watch the previous video for a more in-depth explanation)
What is the
/procfile system in the Linux kernelHow to read
/proc/<pid>/mapsto inspect the VMAs of a live processHow to read
/proc/<pid>/smapsto inspect which VMA is consuming how much physical memoryHow to use mmap
How to use getrusage to track the number of page faults of a process
If you are new to this series, it is based on my ebook called “Virtual Memory from First Principles”. It is available to read for free online and also available to purchase from Gumroad (PDF/Epub) and Amazon (Kindle edition).
And, if you want to watch the previous videos in this series, the following is what has been published so far:











