Address space

Address space

In computing, an address space defines a range of discrete addresses, each of which may correspond to a physical or virtual memory register, a network host, peripheral device, disk sector or other logical or physical entity.

A memory address identifies a physical location in computer memory, somewhat similar to a street address in a town. The address points to the location where data is stored, just like your address points to where you live. In the analogy of a person's address, the "address space" would be an area of locations, such as a neighborhood, town, city, or country. Two addresses may be numerically the same but refer to different locations, if they belong to different address spaces. This is similar to your address being, say, "32, Main Street", while another person may reside in "32, Main Street" in a different town from yours.

Example address spaces:
*House numbers in street addresses
*Street addresses in towns
*Main memory (physical memory)
*Virtual memory
*I/O port space
**IP addresses in particular
*The cylinder-head-sector scheme for hard drives

Specific examples for the Linux kernel:
*Kernel virtual address space
*User virtual address space, accessed by the kernel through copy_to_user(), copy_from_user() and similar functions
*I/O memory, accessed through readb(), writel(), memcpy_toio(), etc.

Address translation

In general, things in one address space are physically in a different location than things in another address space. For example, "house number 101 South" on one particular southward street is completely different from any house number (not just the 101st house) on a different southward street.

However, sometimes different address spaces overlap (some physical location exists in both address spaces). When overlapping address spaces are not aligned, translation is necessary. For example, virtual-to-physical address translation is necessary to translate addresses in the virtual memory address space to addresses in physical address space -- one physical address, and one or more numerically different virtual addresses, all refer to the same physical byte of RAM.

Memory models

Many programmers prefer to use a flat memory model, in which there is no distinction between code space, data space, and virtual memory -- in other words, numerically identical pointers refer to exactly the same byte of RAM in all three address spaces.

Unfortunately, many early computers did not support a flat memory model -- in particular, Harvard architecture machines force program storage to be completely separate from data storage.Many modern DSPs (such as the Motorola 56000) have 3 separate storage areas -- program storage, coefficient storage, and data storage. Some commonly-used instructions fetch from all three areas simultaneously --fewer storage areas (even if there were the same or more total bytes of storage) would make those instructions run slower.

Memory models in x86 architecture

Early x86 computers used addresses based on a combination of two numbers: a memory segment, and an offset within that segment.Some segments were implicitly treated as "code segments", dedicated for instructions, "stack segments", or normal "data segments". Although the usages were different, the segments did not have different memory protections reflecting this.

Now, many programmers prefer to use a flat memory model, in which all segments (segment registers) are generally set to zero, and only offsets are variable.

Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Address Space —   [engl.], Adressraum …   Universal-Lexikon

  • address space — adresų erdvė statusas T sritis automatika atitikmenys: angl. address field; address space vok. Adreßbereich, m; Adreßraum, m rus. адресное пространство, n; диапазон адресов, m pranc. espace adressable, m; espace virtuel, m …   Automatikos terminų žodynas

  • address space — noun A range of discrete addresses, all the address locations available in a particular, named, subset of a computers (virtual or real) memory …   Wiktionary

  • Address space layout randomization — (ASLR) is a computer security technique which involves randomly arranging the positions of key data areas, usually including the base of the executable and position of libraries, heap, and stack, in a process s address space. Benefits Address… …   Wikipedia

  • Address Space Layout Randomization — L’Address Space Layout Randomization (ASLR) ou randomisation de l espace d adressage est une technique permettant de placer de façon aléatoire les zones de données dans la mémoire virtuelle. Il s agit en général de la position du tas, de la pile …   Wikipédia en Français

  • Address Space Layout Randomization — (ASLR)  технология, применяемая в операционных системах, при использовании которой случайным образом изменяется расположение в адресном пространстве процесса важных структур, а именно: образа исполняемого файла, подгружаемых библиотек, кучи… …   Википедия

  • Address Space Layout Randomization — (ASLR, auf Deutsch in etwa Zufallsgestaltung des Adressraum Aufbaus) ist eine Technik, die die Ausnutzung von Sicherheitslücken in Computersystemen erschwert. ASLR vergibt den Programmen zufällig die Adressbereiche, somit ist das System praktisch …   Deutsch Wikipedia

  • Address space layout randomization — L’Address Space Layout Randomization (ASLR) ou distribution aléatoire de l espace d adressage est une technique permettant de placer de façon aléatoire les zones de données dans la mémoire virtuelle. Il s agit en général de la position du tas, de …   Wikipédia en Français

  • Sideways address space — The Sideways address space on the Acorn BBC Microcomputer and Master series microcomputer was Acorn s bank switching implementation, providing for permanent system expansion in the days before hard disk drives or even floppy disk drives were… …   Wikipedia

  • Partitioned global address space — In parallel computing of computer science, the partitioned global address space (PGAS) is a parallel programming model. It assumes a global memory address space that is logically partitioned and a portion of it is local to each processor. The… …   Wikipedia