Cheap and Secure Web Hosting Provider : See Now

Mapping several memories to one address space

, , No Comments
Problem Detail: 

I am trying to understand deeply how memories work in computers, and I faced the next difficulty.

Let's say we have a device with two memory chips but only one address space (for example, 0x00000000 to 0x10000000 will be memory1 and 0x10000000 to 0x20000000 will be memory2). In case an assembly code does a load/store instruction to memory2 to the address 0x10000004, who's responsible it is to change the address so it will be absolute to the memory chip? I assume that the memory chip doesn't know it's relative address space, and in our example memory2 expects a load/store from/to 0x00000004.

Asked By : TJR
Answered By : D.W.

Each RAM chip (e.g., DIMM module) has its own range of physical addresses. The memory controller connects the CPU to the RAM chips via a memory bus.

In its simplest form, each read or write operation sent on the memory bus contains some bits that select which RAM chip it applies to, and some bits that indicate the address to be selected within that RAM chip. So, physical memory is partitioned among the RAM chips. The memory controller is responsible for managing this partition and determining, based on the physical address, which RAM chip to select (what to write on the chip select bits of the memory bus). The specific architectural details have evolved over time and may differ from platform to platform.

Physical addresses are normally not visible to user-level applications. Instead, a virtual memory subsystem (page tables) are used to translate from virtual addresses to physical addresses. The user-level application seems virtual addresses. There need not be any simple way that ranges of virtual memory addresses correspond to RAM chips.

Best Answer from StackOverflow

Question Source : http://cs.stackexchange.com/questions/53967

3200 people like this

 Download Related Notes/Documents

0 comments:

Post a Comment

Let us know your responses and feedback