Designing Virtual Memory Systems

Keeping in mind the high access times (as depicted in Figure 1) software developers must consider, there are a variety of design choices available when developing virtual memory systems. Some of these choices might include:

  • Pages should be large enough. 4KB is the standard in Pentium-X86, and 8KB in Sparc Ultra. Typical page sizes range from 4KB to 16KB.
  • Reducing page faults is one of the key design factors for virtual memory systems. Using fully associative placement of pages helps.
  • Again, looking back at Figure 1, page faults can result in high access times. Therefore, developing efficient software to handle these page faults could help reduce the miss rate. Use writeback instead of write-through policy in virtual memory.


We have seen that through virtual memory, software developers are relieved of several burdens. Virtual memory offers many conveniences for programmers. The end-user is also rewarded with the ability to run programs that exceed actual memory, overcoming the limitations of physical memory.

Virtual memory also offers memory protection. Each process is assigned its own address space and page table, similar to the memory protection available on Mentor Graphics' Nucleus operating system. If one process tries to access memory out of its range, an error will result. Communication of processes is achieved using shared memory. Therefore, through virtual memory, an engineer is allowed more freedom to develop complex applications.

Although the advantages of virtual memory are significant, employing this strategy can have side effects. Virtual memory can reduce the speed of the overall system because in every memory cycle, the system accesses physical memory to check for some particular information. Pages not present in physical memory will have to be swapped in. Continuous swapping of pages in and out of memory definitely reduces speed.

Even though many systems have the capability to use VM, software developers are averse to using it because of additional overhead concerns. This common misperception is changing as more software developers implement balanced VM techniques. Indeed, if more developers adopted VM strategies, the day your 3-GB cell phone device will cost less than its monthly service fee may be just around the corner.

This article was written by Larina D'Souza, Software Development Engineer, Embedded Systems Division at Mentor Graphics (Wilsonville, OR).

For more information, contact Ms. D'Souza at This email address is being protected from spambots. You need JavaScript enabled to view it., or visit