You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though I come here with some struggles and questions let me start by saying that the whole guide is awesome! While I can't quite comprehend everything written, I feel like I've expanded my knowledge dramatically while reading it.
Now let's get back to paging.
In the beginning of the article identity mappings are described and how they are cluttering the virtual address space. What I don't understand here is why is that? What is cluttering here? Why can't we allocate enough page tables (to map entire physical memory) at the beginning of the virtual address space and then use the rest of the address space for the actual usable memory?
For example let's say we have about 2mb of physical memory. Then we need just a single table (4kb) to map it. We can use the 0x1 frame to store that page and then use addresses from 0x2 for the usable memory. This addresses are continuous. We can scale it to several tables if we have more physical memory, but still place them in the first several addresses. What am I missing?
When we later talk about fixed offset mapping it seems to me exactly like my imaginary example above with the only difference that we place page table(s) not in the beginning but rather "in the end", so we could use virtual addressses at the start for "usable memory". What am I missing again?
Later on we enable memory mapping in the bootloader and it is said that bootloader will map complete physical memory for us. But if bootloader already mapped complete physical memory then why do we create frame allocator to map pages? Aren't they all mapped already?
I feel like I have even more questions, but I even struggle to articulate them. Hopefully answers to these ones will help me figure something out and ask further. Please help me figure everything out :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello there!
Even though I come here with some struggles and questions let me start by saying that the whole guide is awesome! While I can't quite comprehend everything written, I feel like I've expanded my knowledge dramatically while reading it.
Now let's get back to paging.
In the beginning of the article identity mappings are described and how they are cluttering the virtual address space. What I don't understand here is why is that? What is cluttering here? Why can't we allocate enough page tables (to map entire physical memory) at the beginning of the virtual address space and then use the rest of the address space for the actual usable memory?
For example let's say we have about 2mb of physical memory. Then we need just a single table (4kb) to map it. We can use the 0x1 frame to store that page and then use addresses from 0x2 for the usable memory. This addresses are continuous. We can scale it to several tables if we have more physical memory, but still place them in the first several addresses. What am I missing?
When we later talk about fixed offset mapping it seems to me exactly like my imaginary example above with the only difference that we place page table(s) not in the beginning but rather "in the end", so we could use virtual addressses at the start for "usable memory". What am I missing again?
Later on we enable memory mapping in the bootloader and it is said that bootloader will map complete physical memory for us. But if bootloader already mapped complete physical memory then why do we create frame allocator to map pages? Aren't they all mapped already?
I feel like I have even more questions, but I even struggle to articulate them. Hopefully answers to these ones will help me figure something out and ask further. Please help me figure everything out :)
Beta Was this translation helpful? Give feedback.
All reactions