The Cost of Virtual Memory

 Paging:

        LRU: keeps track of all page references,  expensive

       Clock Algorithm: maintains a free list of pages, much cheaper

              page in memory--------> page in free list -----------> page out

                                                                                                                                   T1

       T1: time between a page is placed on the free list and actually paged out.
      Advantage: predictive, no one-to-one correspondence between page-out
                          events and page allocations by running processes.

Swapping:
           Based on per-process records, not on statistical estimate;
           Need to avoid thrashing (swaps out ruannable processes).

Locality:    Locality of reference is essntial for good VM behavior