All Topics  
Address space

 

   Email Print
   Bookmark   Link






 

Address space



 
 
In computing
Computing

Computing is usually defined as the activity of using and developing computer technology, computer hardware and computer software. It is the computer-specific part of information technology....
, an address space defines a range of discrete addresses, each of which may correspond to a physical or virtual memory register, a network host
Node (networking)

In communication networks, a node is an active electronic device that is attached to a network, and is capable of sending, receiving, or forwarding information over a communications channel....
, peripheral device, disk sector
Disk sector

In the context of computer disk storage, a sector is a subdivision of a Track on a magnetic disk or optical disc. Each sector stores a fixed amount of data....
 or other logical or physical entity.

A memory address identifies a physical location
Physical address

In computing, a physical address, also real address, or binary address, is the memory address that is electronically presented on the address bus circuitry in order to enable the data bus to access a particular storage cell of main memory....
 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.






Discussion
Ask a question about 'Address space'
Start a new discussion about 'Address space'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In computing
Computing

Computing is usually defined as the activity of using and developing computer technology, computer hardware and computer software. It is the computer-specific part of information technology....
, an address space defines a range of discrete addresses, each of which may correspond to a physical or virtual memory register, a network host
Node (networking)

In communication networks, a node is an active electronic device that is attached to a network, and is capable of sending, receiving, or forwarding information over a communications channel....
, peripheral device, disk sector
Disk sector

In the context of computer disk storage, a sector is a subdivision of a Track on a magnetic disk or optical disc. Each sector stores a fixed amount of data....
 or other logical or physical entity.

A memory address identifies a physical location
Physical address

In computing, a physical address, also real address, or binary address, is the memory address that is electronically presented on the address bus circuitry in order to enable the data bus to access a particular storage cell of main memory....
 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.

Examples

Example address spaces:
  • House numbers in street addresses
  • Street addresses in towns
  • Main memory (physical memory)
  • Virtual memory
    Virtual memory

    Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
  • I/O port space
  • Network
    Computer network

    A computer network is a group of interconnected computers. Networks may be classified according to a wide variety of characteristics. This article provides a general overview of some types and categories and also presents the basic components of a network....
    • IP address
      IP address

      An Internet Protocol address is a numerical identification that is assigned to devices participating in a computer network utilizing the Internet Protocol for communication between its nodes....
      es in particular
  • The cylinder-head-sector
    Cylinder-head-sector

    Cylinder-head-sector, also known as CHS, was an early method for giving addresses to each physical block of data on a hard disk drive. In the case of floppy drives, for which the same exact diskette medium can be truly disk formatting to different capacities, this is still true....
     scheme for hard drives


Specific examples for the Linux kernel
Linux kernel

The Linux kernel is an operating system kernel used by a family of Unix-like operating systems. The term Linux distribution is used to refer to the various operating systems that run on top of the Linux Kernel....
:
  • Kernel virtual address space
    Kernel virtual address space

    The Kernel Virtual Address Space is the virtual memory area in which all Linux kernel threads reside. The second part of the virtual address space is occupied by the User Virtual Address Space which contain user threads....
  • User virtual address space
    Virtual address space

    Virtual address space is a memory mapping mechanism available in modern operating systems such as OpenVMS, UNIX, Linux, and Windows NT. This is beneficial for different purposes, one is security through process isolation....
    , 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
Flat memory model

In low level software design, a flat memory model refers to the memory addressing paradigm. A flat memory model uses a linear addressing scheme, allowing direct addressing all of the available memory locations....
, in which there is no distinction between code space
Code space

In computer programming, code space is the memory segment in the main memory allocated to a process to store the code in execution.In multi-threading environment, thread share code space along with data space, which reduces the overhead of context switching considerably as compared to Process switching....
, data space, and virtual memory
Virtual memory

Virtual memory is a computer system technique which gives an application program the impression that it has contiguous working memory , while in fact it may be physically fragmented and may even overflow on to disk storage....
 — 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
Harvard architecture

The Harvard architecture is a computer architecture with physically separate computer storage and signal pathways for instructions and data. The term originated from the Harvard Mark I relay-based computer, which stored instructions on punched tape and data in electro-mechanical counters ....
 machines force program storage to be completely separate from data storage. Many modern DSP
Digital signal processor

A digital signal processor is a specialized microprocessor designed specifically for digital signal processing, generally in real-time computing....
s (such as the Motorola 56000
Motorola 56000

The Motorola DSP56000 is a family of digital signal processor chips produced by Motorola Semiconductor starting in the 1980s and is still being produced in more advanced models in the 2000?2009....
) 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
Memory segment

x86 memory segmentation refers to the implementation of memory segmentation on the x86 architecture. Memory is divided into portions that may be addressed by a single index register without changing a 16-bit segment selector....
, and an offset
Offset

The term offset may refer to:* Carbon offset* Offset , a number indicating the distance from the start of a data structure object and up to a given element...
 within that segment. Some segments were implicitly treated as code
Code space

In computer programming, code space is the memory segment in the main memory allocated to a process to store the code in execution.In multi-threading environment, thread share code space along with data space, which reduces the overhead of context switching considerably as compared to Process switching....
 segments
, dedicated for instruction
Instruction (computer science)

In computer science, an instruction is a single operation of a central processing unit defined by an instruction set architecture. In a broader sense, an "instruction" may be any representation of an element of an executable program, such as a bytecode....
s, stack
Stack

Stack may refer to:...
 segments
, or normal data segments. Although the usages were different, the segments did not have different memory protection
Memory protection

Memory protection is a way to control memory usage on a computer, and is core to virtually every modern operating system. The main purpose of memory protection is to prevent a process running on an operating system from accessing memory beyond that allocated to it....
s reflecting this.

Now, many programmers prefer to use a flat memory model
Flat memory model

In low level software design, a flat memory model refers to the memory addressing paradigm. A flat memory model uses a linear addressing scheme, allowing direct addressing all of the available memory locations....
, in which all segments (segment registers) are generally set to zero, and only offsets are variable.