Page 1 of 1

Paging and present bit

Posted: Sun May 04, 2003 10:32 am
by Thunder
Hello,

what thats mean present bit?
Could you give me good paging manuals and examples, where there would be answered why do i need paging.
osdev.neopages.net tuts I have :)
Do I need paging for multitasking?
Bye.

Re:Paging and present bit

Posted: Mon May 05, 2003 12:25 am
by Pype.Clicker
the present bit just tells whether the page has memory or not. When pg=0, the program cannot read or write to the page (any attempt to do so will raise a page fault)

It can be used to implement swapping (clearing PG bit and using the 31 remaining bits to tell where the page has been written on disk), or simply when regions of your virtual address space need no physical memory (for instance the hole between the Heap and the Stack needs no physical memory a priori)

Despites it is not mandatory for multitasking in general, the use of paging greatly simplifies the multiprogramming, because each program will have its own view of the memory, regardless of how much and which other programs are running.