The principle of locality states that during phases of execution, a program requires a small subset of virtual pages. The set of pages used during a phase is the locality set of that phase [D3].
A programmer can observe the locality sets of a program in a phase diagram as seen here. Diagrams such as this were used by early programers to create overlay systems.
This diagram shows which segments are located in main memory during a particular phase of execution. Notice that phases are not uniform in length.
Phases of a program can be arbitrarily defined based on observation
of a reference string. Consider the reference string
Programmer could observe phases that would yield either of these
phase diagrams.
Now look at the paging behavior of a real program.
The next demonstration lets you look at phase diagrams for examples of algorithms.
Click on the workbench button for the locality demonstration.