0

When we access an address from a process( say A) , we go through the

page global directory (mm_struct→pgd) ---> |Page directory|--->|page table|--->|page table entry|. In this sequence we will get to page table entry and can access the 'present' bit.

Lets say, if one page of 'A' needed to be swapped out (May be 'A' is sleeping for a long time and these pages are not accessed recently), how the kernel resets the 'present' bit for the page table entry for 'A' ( for the page getting swapped out) .
1)Is there some global trees maintained to do this? 2) If so how is it organized?

Its a question out of my curiosity

msraj
  • 37
  • 4
  • What exactly do you mean? The page table entries will indicate if the present bit is set or not and while swapping in or our the bits can be set or reset. – phoxis Apr 02 '14 at 17:46
  • I was looking for the sequence/ways to get to the page table entry when we swap out a page – msraj Apr 03 '14 at 07:15
  • There are low functions which can fetch the page table entries in kernel more. Possibly you would like to check http://www.amazon.in/Understanding-Linux-Kernel-Daniel-Bovet/dp/8184040830?tag=googinhydr18418-21 – phoxis Apr 03 '14 at 08:48
  • Thnx phoxis, Got few more links, [rmap -lwn](https://lwn.net/Articles/23732/) [object based rmap](https://www.kernel.org/doc/ols/2004/ols2004v2-pages-71-74.pdf) [rmap lwn2](http://lwn.net/Articles/77106/) . Looks like this question is a [duplicate](http://stackoverflow.com/questions/16581490/how-does-kernel-know-which-pages-in-the-virtual-address-space-correspond-to-a-s?rq=1) – msraj Apr 03 '14 at 13:56

0 Answers0