Click to See Complete Forum and Search --> : Virtual address vs. physical address?


mikeshn
03-21-2002, 09:27 AM
What is the difference between a physical address and a virtual address?

mdwatts
03-21-2002, 06:02 PM
I suppose one would be the real address and the other the alias/fake address.

Is this in reference to Apache and virtual hosts?

marvin
03-21-2002, 07:08 PM
Are you talking about memory addresses and virtual memory?

In that case.

The physical memory is the primary memory (RAM). A physical address is the address to a physical memory location in the primary memory.

The secondary memory is normally a disk, like a swap partition or a swap file, and (normally) much slower than the primary memory.

The virtual memory is the physical memory combined with the secondary memory. A virtual address is the address of something stored in the virtual memory. The data stored at a virtual address might be located in the primary or in the secondary memory.

A programmer uses the virtual address when addressing data. To the programmer it appears as if there is a large amount of fast physical memory available and he/she never has to worry about that the program might need more physical memory than available.

The instructions being executed and the data that is read/written must be in the primary memory. The programmer don't have to worry about this either, the system takes care of that. If the page containing the requested virtual address is not in the primary memory, the operating system finds some free physical memory (or selects a page to swap out to secondary memory) and loads the requested page to the primary memory.

mdwatts
03-21-2002, 07:28 PM
Either way... a Google search should find what you want.

Google fixes/answers everything.

andyfly
03-22-2002, 12:00 AM
if you are referring to the Physical address of a network card. it is also referred to as a MAC address (kind of like a serial number - usually looks like 00-50-a6-46-fb-a4). The mac is used by some internet ISP's to connect you to the network. Im not sure what the virtual address is though.