Hi ,
   I am studing current page reaplcement policy that is LRU (actually LRU
like policy) .

            In that ,  whenever there is first access to page , insert that
page into inactive list ( PG_lru =1 , PG_referenced =0 ) . For second
reference , keep the page in inactive list but mark it accessed . (PG_lru =1
and PG_referenced =0 ) . For third reference , move the page to active list
(PG_lru =1 , PG_active =1 and PG_referenced =0 ) .

          OK.... but whenever there is page fault , control comes to
handle_mm_fault . It determine causes of page fault ans accordingly handle
it .




                                    handle_mm_fault

                                                |

                                                |

                                    Handle_pte_fault

                                                |

                                                |


------------------------------------------------------------------

            |                                   |
|

            |                                   |
|

do_anonymous_page            do_wp_page                    do_swap_page


In any case (mentioned above ), if these function allocates new page frame
then that page frame is directly get added into active list (by calling
lru_cache_add_active ) .

              I am here not unserstanding , why this algorithm directly add
new page to active list , eventhough that page has first access ?


Thanks
   shyam

Reply via email to