Page 1 of 1

Paging

Posted: Mon Jul 05, 2004 3:51 pm
by Måns
Exactly what is paging? And how do I set it up/use it... tried to read the FAQ but didnt understand it...

Re:Paging

Posted: Sun Jul 11, 2004 11:10 am
by Freanan
Paging is an alternative to segmentation...
With paging enabled memory is divided into pages of 4kb each.
You can store the start adresses and attributes of 1024 pages in one
page table.
There can be 1024 page tables in memory, whose start adresses and attributes are in turn stored in ONE page directory:
page directory CONTAINS data of page tables CONTAIN data of pages.
That's it...
But to be honest, i just started to get into paging too, and my code does not work properly ;)

Re:Paging

Posted: Sun Jul 11, 2004 3:21 pm
by Dreamsmith
Paging is a way to map logical addresses to (possibly) different physical addresses. Say a program wants to execute from an address of 0x08048000, using a continuous block of memory from there to 0x08148000. So you hand it that memory. Then another process wants to use that same memory block. (On most Linux systems, EVERY program wants to start at that addresses.) Obviously, you can't hand the same physical pages to two different processes. On IA-32 processors, you can use segments to solve this problem, but most processors use paging instead, so most operating systems, even on IA-32 processors, use paging. Using paging, you take a different set of pages and map them to the same address, so both programs get the same logical memory map while using different underlying physical memory. You're just adding a layer of abstraction so that programs don't have to be aware of the details of how they are laid out in memory -- they can all pretend to be in their own space without worrying about other processes.

Hopefully, with this in mind, the explanations in the FAQ as to how you use it will make a bit more sense. If you don't even understand what it's for or why it's necessary, making sense of how to use it is a real problem. :-\ Hope that helps.