1832978 Members
2858 Online
110048 Solutions
New Discussion

Re: memory

 
Jay Cantwell
Regular Advisor

memory

Could someone please explain to me the relationship between RAM (physical memory) and
swap??? thanks..Jay
4 REPLIES 4
MARTINACHE
Respected Contributor

Re: memory

Hi,

Swap space is an area on disk that temporarily holds a process memory image.

Example: when you got out of physical memory a process will use swap space.

Some mechanisms determine which process must be in physical memore or on swap.

Regards,

Patrice.
Patrice MARTINACHE
John Bolene
Honored Contributor

Re: memory

Programs first get loaded into RAM with swap space reserved if they eventually get swapped out.
Programs already in RAM with a lower priority get swapped to disk when a higher priority job needs memory space.
This answer can get more complicated depending on how involved of an answer you want.
If this does not answer the question, please ask a more detailed question.
It is always a good day when you are launching rockets! http://tripolioklahoma.org, Mostly Missiles http://mostlymissiles.com
David Child_1
Honored Contributor

Re: memory

Jay,

Physical memory are actual cards that plug into your server/workstation. In an ideal world this is all your machine would use (for memory), but as in most things the world is not an ideal place.

To basically extend the amount of memory in a system so that more programs and applications can run, swap is used. Swap is an area on a disk(s) that the system uses to temporarily store data so that other applications can use the physical memory. When the swapped data is needed it is pulled back into phyical memory.

As you can imagine, when the system must swap out data it slows things down a bit - physical memory is very fast, but writing to and reading from the disk is relatively much slower.

David
Andy Monks
Honored Contributor

Re: memory

Jay,

swap is used as part of the virtual memory system (which hpux is as are all unix systems).

Have a read of the file called :-

/usr/share/doc/mem_mgt.txt

it's on all 10.X and higher machines.