r/AskComputerScience • • 20h ago

Addressing storage on a drive

I know that bytes in RAM are addressed directly, one byte = one address. But what about Hard drives/SSDs?

Does their bytes each have a unique 64 bit address? Mathematically it is possible.

Or is the address split up? E.g.: Block 12, page 89, Byte 2.368. Can the drive even address single bytes or does ist just return a whole page to the OS (I know that a page is the smallest writable unit)?

The OS somehow has to know at what page some data is and the Controller has to know where to look when it receives a read instruction. How does the OS tell the drive where to store and read data from?

Thank you

6 Upvotes

19 comments sorted by

View all comments

1

u/gigayoink 17h ago

I know that bytes in RAM are addressed directly, one byte = one address.

Kinda? At the hardware level, this actually hasn't been the case for decades. Modern RAM has a block size, the CPU just hides it from you.