Fun fact: people like to say that unlike Flash memory, RAM can be read or written to one byte at a time, but that's a lie. A typical DIMM's memory array can only be addressed in 64KiB blocks! Writing one byte means reading 64K, modifying one byte, and writing 64K! (1/n)
-
-
The difference is that RAM doesn't wear out, so nobody cares that it works this way. The RAM can also combine a long sequence of reads or writes, sequential or scattered, within one page, into one read, a sequence of I/Os, and a write back to the array. (3/n)
Show this thread -
So next time someone tells you "RAM can be accessed at a granularity of one bit", remember that's not really true. It actually uses huge pages just like Flash, which is fundamental when memory is organized as a big 2D array (the page size is one dimension). (4/4)
Show this thread -
Addendum: I meant 64 kibibits (64 Kibits or 64Kib) in my original tweet, not 64 kibibytes. It's usually something like 8 bits per chip × 8 chips = 64 bits for a whole DIMM, and pages (rows) are 1024 addresses within each bank, so 65536 bits.
Show this thread
End of conversation
New conversation -
-
-
Yup, that's how dynamic memory works — charging (or not charging a capacitor), and then disconnecting it, to store a value; and, conversely, connecting it again, and checking if it was charged, to read the value. That's why DRAM requires a lot of additional circuitry to operate.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Wait, so does this mean this all happens 64K times when you do write/read an entire block of memory? And even multiple times when the CPU reads or writes a cache line etc? Or is there a way around that?
-
No, the RAM can batch a series of operations on the same block together so it gets read once, updated, and written back again once it's all done. Cache lines in particular would pretty much always be read or written as a single operation, never split.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.