Reputation: 1013
PS: I really don't know if this is off-topic (I read the question help), but I saw a question on the site of the same topic (but not the same question) and it wasn't closed as off topic so just assuming.
Anyway, I'm learning and researching about Paging and I'm really confused on how Pages are structured. I've Googled to no avail (I may just be bad at Google) and every paper on Paging is pretty confusing.
Is there one offset for the ENTIRE virtual memory? Or am I just lost in wonderland??
Could someone please give a practical example of how Paging works if at all possible?
Upvotes: 1
Views: 402
Reputation: 8292
Virtual Memory is just one large imaginary contiguous block of memory. Its there so that programmers need not know or worry about the actual physical addresses specifications. They can just sit back and worry about their program logic or algorithm and other machine independent stuff.
Before any read or write occurs, these virtual addresses are converted to actual physical addresses by Memory Management Unit(MMU). To be specific it is done by page table which is nothing but a part of MMU.
Apart from this Paging allows to have non-contiguous memory allocation so that we do not have external fragmentation.
This topic is very simple if you understand the basics. I would recommend videos by David Black-Schaffer on youtube.
Upvotes: 1