地址線和匯流排
DRAM裡的每一個位元組(BYTE)分配了一個唯一的被稱為”地址(address)”的數位識別碼. 一個地址是一個整數值. 記憶體裡的第一個位元組分配的地址是零. 靠近零地址的記憶體地區通常被稱為”低端記憶體(bottom of memory or low memory)”. 記憶體空間物理位元組表示處理器可定址的物理地址空間.
處理器的物理地址空間決定了它所擁有的地址匯流排數量. 地址匯流排是一組串連處理器到DRAM晶片的金屬線, 每一個地址線指定了位元組(a given byte)中一個位(a single bit)的地址 (Each address line specifies a single bit in the address of a given byte.). 比如, Intel Pentium有32個地址線, 這意味著每個位元組是分配了一個32位(bit)地址, 所以它的錄址空間由232個可設定地址位元組組成(4GB).
NOTE If virtual memory is enabled on the Pentium 4, there is a way to enable four additional address lines using what is known as Physical Address Extension (PAE). This allows the Pentium processor’s physical address space to be defined by 36 address lines, which translates into an address space of 236 bytes (64GB).
處理器使用一個控制匯流排和一個資料匯流排來存取和更新實體記憶體. 匯流排(BUS)是一組串連了硬體子系統的金屬線. 控制匯流排用於指示處理器是從記憶體讀, 還是往記憶體寫. 資料匯流排用於在處理器和記憶體之間進行資料的運送.
當處理器讀記憶體時, 將執行如下步驟:
1. 處理器將需要讀取和位元組的地址放到地址匯流排
2. 處理器發送讀訊號給控制匯流排.
3. DRAM 晶片返回資料匯流排上指定的位元組.
?
當處理器寫記憶體時, 將執行如下步驟:
1. 處理器將需要寫的地址放到地址匯流排.
2. 處理器發送寫訊號給控制匯流排.
3. 處理器發送要寫到記憶體的位元組給資料匯流排.
描述有些過於單純化. 例如, the Pentium processor reads and writes data 4 bytes at a time. This is one reason why the Pentium is called a 32-bit chip. The processor will refer to its 32-bit payload using the address of the first byte (i.e., the byte with the lowest address). Nevertheless, I think the general operation is clear.