next up previous contents
Next: Shells Up: Operating System Concepts Previous: Multi-processing

Virtual Memory

 

UNIX is an operating system which uses virtual memory.

Memory is a resource that the operating system needs to manage. While it is possible to play ``games'' with things known as pages and frames, the following gives some example of how much memory the various operating systems can address:

Well, it can get a little more complicated than this. It is possible to work with a number of chunks of memory (each one assigned an index), and occasionally we have to switch from one ``bank'' of memory to another. This was a common occurrence with computers like the Apple ][.

It is sometimes much easier to write a program to assume a certain size of address space, and then if the memory (RAM) available is smaller than this, perform some kind of magic to simulate the much larger address space. In some instances, a program may not actually be using the entire address space it is spanning, rather it uses clusters of memory scattered throughout the address space. If the operating system is smart, it can collect the memory references so that the physical memory accessed is contiguous, even though the logical memory isn't.

Often a computer will use some ``special'' room on the hard disk(s) as if it was RAM. It does this to ``compact'' physical memory accesses, or if the amount of memory required for all running programs is larger that how much memory is actually available. How the operating system determines which ``pages'' of memory are not likely to be needed, and hence can be ``swapped'' out to disk is largely ``magic''.

While most of us are not very knowledgeable about how operating systems work, a few of us might be more familiar with how the Internet and its addressing works. The Internet runs on an address space that is (almost) the same as a 32 bit operating system, and is just now starting to run out of locations. So we are starting to see that some groups of computers share a much smaller number of addresses. Much like this thing called IP Masquerading that Linux is well known for.


next up previous contents
Next: Shells Up: Operating System Concepts Previous: Multi-processing

Gordon Haverland
Sat Oct 9 13:50:48 MDT 1999