There are two ways in which page replacement can affect the possibility of thrashing. One is how many NRU pages are allowed to take away from a process continuously, another is how easily an NRU page can be produced. When the accumulated size of working sets of all active processes exceeds the available memory size, the amount of pages allowed to be replaced continuously from a process once it is selected determines the distribution of memory shortage among the processes. If only a small amount of NRU pages in each process is allowed to replace at a time, the memory shortage can spread all over the processes by searching the victim page from one process to another. If the replacement policy allows a large amount of pages to be evicted from a process once at a time, and it also has prepared enough NRU pages for eviction, memory shortage can concentrate on one or a few particular processes, which helps others have their working set established more easily. This alternative reduces the possibility of thrashing. However, in such an arrangement, the chance for the other processes to be searched for NRU pages is reduced. Thus it becomes hard to distinguish active pages in a working set from inactive pages in the other processes. This arrangement may also prevent memory space held by inactive pages from being reused by processes lacking memory space. In the following analysis of function swap_out() of Kernel 2.0, 2.2 and 2.4, where major steps regarding how to select a process for page replacement are shown in the respective flow charts, we can see the design challenge in page replacement policies.