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.
Paging and present bit
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Paging and present bit
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.
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.