• Physical memory - RAM (Random Access Memory)
  • ROM/EPROM - Fixed memory (read at boot time)
  • Available memory - Physical memory minus memory used by kernel
  • Lockable memory - memory which is used for non swapable/pageable memory. i.e. has to be locked into memory. Controlled by unlockable_mem kernel parameter
  • Secondary storage/memory - usually disk, either device swap or file system swap
  • swapping - whole process moved in and out of memory
  • paging - pages of the process swapped in and out (more efficient than swapping)
  • address translation - mapping virtual address space to physical address space
  • virtual address space - contains info & pointers to memory the process can reference. Also points to per-process regions (pregions). These point to segments of code, data, etc. used by the process
  • vnodes - used by memory management to keep a track of swapped or paged memory

vhand and swapper daemons control paging and swapping. [memory.gif]

Notes on memory management

Thrashing - paging and swapping at such a high level, virtually no processing taking place.

File system swap is slower than device swap because it writes in smaller blocks ( so more writes required) and may not be in contiguous blocks

swap must be big enough to hold all shared memory + shared libs + stack + data for the largest executable process. To calculate this, can use: size command to calculate program requirements. ipcs to display shared memory (ipcs -m -a).

swap should be an integer of 2Mb (because swapchunks use 2Mb chunks). As a rough guide, a swap size of between 2 to 4 times the memory size is recommended.

Recent Changes