This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ging will destroy program performance. In practice, virtual memory works pretty well because of our old friend locality. Although the total number of pages that programs reference during an entire run might exceed the total size of physical memory, the principle of locality promises that at any point in time they will tend to work on a smaller set of active pages known as the working set or resident set. After an initial overhead where the working set is paged into memory, subsequent references to the working set result in hits, with no additional disk trafﬁc. As long as our programs have good temporal locality, virtual memory systems work quite well. But of course, not all programs exhibit good temporal locality. If the working set size exceeds the size of physical memory, then the program can produce an unfortunate situation known as thrashing, where pages are swapped in and out continuously. Although virtual memory is usually efﬁcient, if a program’s performance slows to a crawl, the wise programmer will consider the possibilit...
View Full Document
- Spring '10
- The American