Understanding the hierarchy of storage can help programmers better understand how the system moves data up and down in the memory hierarchy, so that the data of the programs they write can be placed at a higher level, allowing the CPU to access them more quickly.
Random access memory: S(Static)RAM: Each bit is stored in a bistable memory unit with a bistable state. The characteristics of the memory unit can only be stably maintained in two stable state of any one, just like the inverted pendulum only on the left or the right two stable state, this property allows the SRAM from any state quickly transferred to one of the two stable state. Because of this nature, so that the memory in the presence of electricity will permanently maintain its value, if there is electromagnetic interference, after the electromagnetic interference disappears after the memory circuit will quickly return to a stable state. D(dynamic)RAM: Each bit is stored as a charge to a very small capacitor (30*10e-15f). Each unit consists of a capacitor and an access transistor, so the circuit can be made very small. But DRAM is very sensitive to interference, in many cases caused by the leakage of the situation, its capacitance will lose charge in the 10~100ms, but because the modern computer operating cycle is measured in NS, the system periodically re-brush each bit. Some systems use error-correcting codes to correct the errors. difference: As long as there is power supply, SRAM does not need to refresh, and SRAM access is faster than SRAM, not sensitive to interference, but its use of more transistors, low density, power consumption, so the two types of memory according to the use of different applications in different locations. (SRAM is used in cache memory , DRAM is used in main memory and frame buffer )
access to memory module data: In the memory module, the data is not stored in a contiguous area, but is stored in a single byte in each storage unit. The process of fetching data is probably as follows, when a 64-bit double word is stored at address A, the memory controller converts a to a supercell address (I,J), sends it to the memory module, and the memory module then broadcasts the address to each DRAM, Each DRAM is then taken out of its own (I,J) byte, where the circuit collects the output and assembles it into a 64-bit double word to return to the memory control module. time locality temporal locality: In a well-localized program, the location of the referenced memory is likely to be referenced more than once in the near future. spatial locality spatial locality: In a program with good spatial locality, if a memory location is referenced once, the program is likely to refer to a nearby memory location in the near future.
Random access memory, memory module data access, locality _15.09.15/2-the sixth chapter (6.2)