Web www.surf.org.uk

search
cyrus
cyrus sasl
deliver patch
cyrus pwcheck
ldap
squid auth
BBC ticker
Latest from BBC
bspline
visual perl qt
piano chord & scale finder
contact us
 


Non Virtual Memory Systems: Advantages and disadvantages

By Simon Loader

Non Virtual Memory systems main advantage over Virtual Memory systems are their simplicity. Sharing memory temporally by swapping each process to a hard disk or means memory references within a process need only be modified once upon loading of the process.
The drawback of this means that context switching is slow as each process needs to be written to disk before reading back the next processes. By using partitioning where each process is loaded into a separate area of memory removes this problem. Over time of processes starting and stopping memory becomes fragmented leaving useable space harder to find.

Some of the ways NVM has tried to control the problem of fragmentation is with code folding where the compiler is needed to define areas of a process which may not be needed after initialisation or section than can be overlaid as they will not be used in conjunction. Another method used is segmentation where a process is split into several segments when compiled so that each segment can be allocated different memory areas. The references in these areas are changed at the start of the process to point to the correct areas of memory. Both methods require the compiler to make decision about the program to be able to place the process in segments. Using segments lead towards non virtual memory becoming more like virtual memory. As segments can be paged out to disk and paged back into different memory location. Although this is a slower process as the memory references with in the segment need to be updated if it is not placed in the same place and a map kept of where they are.

Virtual memory removes the problem of fragmentation by allowing processors to be allocated any where and to have different pages or segments of a process to be in different locations. The translation of the memory allocation automatically accesses the correct memory allowing for more efficient use of memory for multiprocessors. This is more complex than not virtual memory as translation is done as and when required not when loading a process. Although virtual memory systems often use features built into the processor to achieve this there is still an over head upon memory access. NVM systems can only support the size of real memory in the system where as because a translation virtual memory provides it can support virtual memory many times large then the actual memory available. It can be as large as the address space available to the processor. Virtual memory really shows performance increase over NVM when multiple processes are used.

Non virtual memory systems are far simpler than virtual memory but do not scale well as larger size processes and multiple processing is required. It is best suited to either one static process of a very low number of continually running processes. The over head of using virtual memory has gone as CPU`s support translation on the fly.


About the author: Simon Loader is a UNIX and email specialist who runs Surf, a free IT resource and downloads website, in his spare time . Many of the downloads and articles on Surf created by Simon are featured in technical websites all over the world. To access FREE downloads and information covering several diverse IT topics visit www.surf.org.uk.