MEMORY ADDRESS

In computer science, a 'memory address' is a unique identifier for a memory location at which a CPU or other device can store a piece of data for later retrieval. In modern ''byte-addressable'' computers, each address identifies a single byte of storage; data too large to be stored in a single byte may reside in multiple bytes occupying a sequence of consecutive addresses. Some microprocessors were designed to be ''word-addressable'', so that the typical storage unit was actually larger than a byte. Examples include the Texas Instruments TMS9900 and the National Semiconductor IMP-16, both of which used 16 bit words.
An 'absolute address' in computing is the precise indication of a memory location without the use of any intermediate reference. This is when the memory address indicated contains the data needed. Synonyms include ''explicit address'' and ''specific address''. Virtual memory and physical memory both use memory addressing.
Virtual memory is an imaginary memory area supported by some operating systems (for example, Windows but not DOS) in conjunction with the hardware. You can think of virtual memory as an alternate set of memory addresses. Programs use these virtual addresses rather than real addresses to store instructions and data. When the program is actually executed, the virtual addresses are converted into real memory addresses.
The purpose of virtual memory is to enlarge the address space, the set of addresses a program can utilize. For example, virtual memory might contain twice as many addresses as main memory. A program using all of virtual memory, therefore, would not be able to fit in main memory all at once. Nevertheless, the computer could execute such a program by copying into main memory those portions of the program needed at any given point during execution.
Physical Memory refers to anything pertaining to hardware. The opposite of physical is logical or virtual, which describe software objects. For example, physical memory refers to the actual RAM chips installed in a computer. Virtual memory, on the other hand, is an imaginary storage area used by programs.
A physical data structure refers to the actual organization of data on a storage device. The logical data structure refers to how the information appears to a program or user. For example, a data file is a collection of information stored together. This is its logical structure. Physically, however, a file could be stored on a disk in several scattered pieces.
To facilitate copying virtual memory into real memory, the operating system divides virtual memory into pages, each of which contains a fixed number of addresses. Each page is stored on a disk until it is needed. When the page is needed, the operating system copies it from disk to main memory, translating the virtual addresses into real addresses.
This translation is invisible to applications software (though can be quite involved at the machine design level), and allows the software to operate independently of its location in physical memory, giving the operating system the freedom to allocate and reallocate memory as needed to keep the computer running efficiently. Because the virtual memory size can be much larger than the physical RAM available to a computer, the operating system can use a page file and/or a swap file to temporarily move pages of memory to secondary storage when they are either not being used, or when the process that is using them is idle.
Very often, when referring to the ''word size'' of a modern computer, one is also describing the size of virtual memory addresses on that computer. For instance, a computer said to be "32-bit" usually treats memory addresses as 32-bit integers; a byte-addressable 32-bit computer can address 2^{32} = 4,294,967,296 bytes of memory, or 4 gibibytes.
However, older computers often supported memory addresses larger than their word size, or else their memory capacity would have been unreasonably small. For instance, the 8-bit 6502 supported 16-bit addresses, or else it would have been limited to a mere 256 bytes. Similarly, the 16-bit Intel 8086 supported 20-bit addresses, allowing it to access 1 mebibyte rather than 64 kibibytes.
A byte-addressable 64-bit computer can address 2^{64} bytes (or 16 exbibytes) which as of 2005 is considered practically unlimited, being far more than the total amount of RAM ever manufactured.
Depending upon its underlying architecture, the performance of a computer may be hindered by ''unaligned'' access to memory. As an example, a 16 bit computer with a 16 bit memory data bus such as an Intel 8086 generally works most efficiently if the data is aligned so that it starts on an even address, so that fetching one 16 bit value requires a single memory read operation. If the 16 bit data value starts at an odd address, the processor may actually need to perform two memory read cycles to load the value into it, i.e. one for the low address (throwing half of it away) and then a second to load the high address (again throwing half of the retrieved data away).

Contents
See also

See also



Endianness

Addressing mode

Base address

Offset (computer) (aka displacement)

Physical address

Virtual address

This article provided by Wikipedia. To edit the contents of this article, click here for original source.

psst.. try this: add to faves