Memory Addresses

Programmers casually refer to a memory address as the way to access the contents of a memory cell. But when dealing with 80 x 86 microprocessors, we have to distinguish three kinds of addresses:

Logical address

Included in the machine language instructions to specify the address of an operand or of an instruction. This type of address embodies the well-known 80 x x86 segmented architecture that forces MS-DOS and Windows programmers to divide their programs into segments. Each logical address consists of a segment and an offset (or displacement) that denotes the distance from the start of the segment to the actual address.

Linear address (also known as virtual address)

A single 32-bit unsigned integer that can be used to address up to 4 GB — that is, up to 4,294,967,296 memory cells. Linear addresses are usually represented in hexadecimal notation; their values range from 0x00000000 to 0xffffffff.

Physical address

Used to address memory cells in memory chips. They correspond to the electrical signals sent along the address pins of the microprocessor to the memory bus. Physical addresses are represented as 32-bit unsigned integers.

The CPU control unit transforms a logical address into a linear address by means of a hardware circuit called a segmentation unit; subsequently, a second hardware circuit called a paging unit transforms the linear address into a physical address (see Figure 2-1).

Figure 2-1. Logical address translation

Figure 2-1. Logical address translation

In multiprocessor systems, all CPUs share the same memory; this means that RAM chips may be accessed concurrently by independent CPUs. Since read or write operations on a RAM chip must be performed serially, a hardware circuit called a memory arbiter is inserted between the bus and every RAM chip. Its role is to grant access to a CPU if the chip is free and to delay it if the chip is busy servicing a request by another processor. Even uniprocessor systems use memory arbiters, since they include a specialized processor called DMA that operates concurrently with the CPU (see Section 13.1.4). In the case of multiprocessor systems, the structure of the arbiter is more complex since it has more input ports. The dual Pentium, for instance, maintains a two-port arbiter at each chip entrance and requires that the two CPUs exchange synchronization messages before attempting to use the common bus. From the programming point of view, the arbiter is hidden since it is managed by hardware circuits.

Continue reading here: Segmentation in Linux

Was this article helpful?

0 0

Readers' Questions

  • aatifa haile
    How to memorize addresses quickly?
    2 days ago
    1. Break the address down into groups of words: Start by breaking down the address into small groups of words. This can help you to chunk the address into chunks that will be easier to remember.
    2. Visualize the address: Creating a visualization of the address can help you to remember it. Try to imagine images or stories related to the address and create a visual memory of it.
    3. Use mnemonics: Mnemonic devices such as rhymes or acronyms can help you associate the words with something else that will make it easier to remember.
    4. Write it down and practice: Writing out the address multiple times can help you to remember it. As you write it out, practice saying it out loud or silently to yourself.
    5. Associate the words with a physical location: Visualizing the address in a physical location can help you to better remember it. Try to associate each group of words with a spot or object in a room or house.
    • mikaela
      How to memorize addresses?
      2 months ago
      1. Set a System: Take the address and break it down into smaller parts. For example, a street address might include the following components: Street number, street name, city name, state (or province), and zip or postal code.
      2. Create a Visual or Musical Mnemonic Device: Use a mnemonic device to help create a mental picture. This could be a combination of images that represent each part of the address, a song or rhyme with the address, or a word/phrase associated with each part of the address.
      3. Practice and Repeat: If necessary, write down the address and practice saying it out loud. After repeating it multiple times, it should become easier to remember.
      4. Utilize Memory Aids: If necessary, write the address down and store it in a place where it can be easily accessed. Use sticky notes, a phone, or a notepad to store the address until it is committed to memory.