1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| 1. Contains pages "actively" (recently) referenced by userland 2. Contains a mix of clean and dirty pages 3. Pages are regularly scanned by the page daemon (each page is visited once every vm.pageout_update_period seconds) 4. Scans check to see if the page has been referenced since the last scan 5. If enough scans complete without seeing a reference, the page is moved to the inactive queue 6. Implements pseudo-LRU
1. Contains pages aged out of the active queue 2. Contains pages evicted from the buffer cache 3. Contains a mix of clean and dirty pages 4. Pages are scanned by the page daemon (starting from the head of the queue) when there is a memory shortage: 1) Pages which have been referenced are moved back to the active queue or the tail of the inactive queue 2) Pages which are dirty are moved to the tail of the laundry queue 3) Unreferenced, clean pages may be freed and reused immediately 5. Implements second-chance LRU
1. Queue for managing dirty inactive pages, which must be cleaned ("laundered") before they can be reused 2. Managed by a separate thread, the laundry thread, instead of the page daemon 3. Laundry thread launders a small number of pages to balance the inactive and laundry queues 4. Frequency of laundering depends on: 1)How many clean pages the page daemon is freeing; more frees contributes to a higher frequency of laundering 2)The size of the laundry queue relative to the inactive queue; if the laundry queue is growing, we will launder more frequently 5. Pages are scanned by the laundry thread (starting from the head of the queue): 1)Pages which have been referenced are moved back to the active queue or the tail of the laundry queue 2)Dirty pages are laundered and then moved close to the head of the inactive queue
1. Memory available for use by the rest of the system.
1. Non-pageable memory: cannot be freed until explicitly released by the owner 2. Userland memory can be wired by mlock(2) (subject to system and per-user limits) 3. Kernel memory allocators return wired memory 4. Contents of the ARC and the buffer cache are wired 5. Some memory is permanently wired and is never freed (e.g., the kernel file itself)
|