Paging and present bit

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Thunder

Paging and present bit

Post 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.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Paging and present bit

Post 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.
Post Reply