Page replacement algorithm: Difference between revisions

Content deleted Content added
Fixed a typo in the history section
Line 11:
* Memory hierarchies grew taller. The cost of CPU cache miss is far more expensive. This exacerbates the previous problem.
 
* [[Memory locality|Locality of reference]] of user software has weakened. This is mostly attributed to the spread of [[Object-oriented programming]] techniques that favor large number of small functions, use of sophisticated data structures like [[Tree data structure |tree]] and [[Hash table]] that tend to result in chaotic memory reference patterns, and the advent of [[garbage collection (computer science)|garbage collection]] that drastically changed memory access behavior of applications.
 
Also, requirements to the replacement algorithms has changed due to the changes in the operating system [[Kernel (computer science)|kernel]] architectures. In particular, most modern OS kernels have unified virtual memory and file system caches. This means, that replacement algorithm has to deal with selecting a target page among pages from both virtual address spaces of user programs and from cached files. The latter pages has specific properties. For example, they can be locked, or can have write ordering requirements imposed by [[journalling]]. Moreover, as the goal of page replacement is to minimize total time wasted by waiting for memory, it has to take into account memory requirements imposed by other kernel sub-systems that allocate memory. As a result, in modern kernels ([[Linux]], [[FreeBSD]], and [[Solaris Operating Environment|Solaris]]) page replacement tends work at the level of low-level general purpose kernel memory allocator, rather than at the level of virtual memory subsystem proper.