1
\$\begingroup\$

Since all kinds of flash memories feature different transfer rates according to the kind of operation performed at a given moment (e.g., random access reads versus random access writes, random access reads versus sequential reads, etc), could SSDs be considered as random-access devices?

Of course, if the access time (latency) is not the same for all operations (as definitely it is the case with SSDs), in principle neither SSDs or any other flash-based storage device should be thought as random access. On the other hand, the latency for a given access is independent from prior accesses: you are supposed to access any memory position you want by simply presenting an address in a given bus (as opposed to search for markers between records stored sequentially, as it is the case with tapes). In fact, many people wonder how long is gonna take for flash-based storage devices replace RAM sticks. So, should flash-based devices as SSDs be thought as "true" random access devices?

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Can you clarify what you mean by "true" random access, if you're not concerned about latency? Clearly, any SSD (or hard drive for that matter) will allow you to read and write data at random, with varying performance characteristics. If you leave '"true" random access' open to interpretation, I'd say this question is primarily opinion-based. \$\endgroup\$ – Nate S. Nov 30 '18 at 0:04
  • \$\begingroup\$ Nate, perhaps I am a bit obsessed with details, but I always wondered if flash-based devices should be classified as random-access since they have varying performance characteristics (as you sharply pointed out). After all, by definition, random-access devices have the same access time for all operations. \$\endgroup\$ – Humberto Fioravante Ferro Nov 30 '18 at 0:10
  • 1
    \$\begingroup\$ Well, the answer you quoted below is using a different definition of random access, namely random-BYTE-access -- that you can specifically address a particular byte and get only that one. NAND devices are block devices, so you can't address individual bytes, but I would expect the latency to get any block would be identical in most cases, so that would actually fulfill your identical-latency-access definition. The varying latency comes in at the drive level, where you can't usually use as many NAND dies in parallel as you can with a sequential workload. \$\endgroup\$ – Nate S. Nov 30 '18 at 0:17
  • \$\begingroup\$ Indeed, @SamGibson. I finally got that by reading all comments in this thread, including yours: SSDs are "random" in the sense they can access any block you want but if you understand "random access" as a synonymous for "constant access times", they are not. You know what? By now, I think that "random" should be understood as the capability of accessing any addressable unit at a given time, despite the variable latency issue. \$\endgroup\$ – Humberto Fioravante Ferro Nov 30 '18 at 0:36
4
\$\begingroup\$

From Random-access Memory (Wikipedia):

A random-access memory device allows data items to be read or written in almost the same amount of time irrespective of the physical location of data inside the memory. In contrast, with other direct-access data storage media such as hard disks, CD-RWs, DVD-RWs and the older magnetic tapes and drum memory, the time required to read and write data items varies significantly depending on their physical locations on the recording medium, due to mechanical limitations such as media rotation speeds and arm movement.

Based on this definition, I would argue that YES, SSDs are "true" random-access devices. Access speed does not vary at all based on where on the media a particular bit of information is stored. The reason SSDs are faster at sequential access than random access has nothing to do with the underlying NAND, but rather its because the controller can always access all NAND dies in parallel, whereas for a random workload this is statistically unlikely. Also, a smart controller can detect that you're doing a sequential workload, and start reading data ahead of what you've asked for yet. However, this only applies to large-block access, so if you're accessing a specific byte at a time, you won't be able to take advantage of this parallelism anyway. At the NAND level, the sequential reads take just as long as the random ones, it's just that you can start the next one before the first one finishes.

\$\endgroup\$
1
\$\begingroup\$

Right after I posted this question, I've read a text from William Stallings (Computer Organization and Architecture) clarifying my doubt. Since my doubt could be somebody else's too, I quote Stallings text below. Simply put, this is the answer: NAND flash-based memories can not be considered as random-access because they are not endowed with a random-access external address bus (unlike I thought). On the other hand, NOR devices "provides high-speed random access. It can read and write data to specific locations, and can reference and retrieve a single byte"; so, differently from NOR devices, they are random_access.

Stallings' text follows below:

There are two distinctive types of flash memory, designated as NOR and NAND. In NOR flash memory, the basic unit of access is a bit, and the logical organization resembles a NOR logic device. For NAND flash memory, the basic unit is 16 or 32 bits, and the logical organization resembles NAND devices.

NOR flash memory provides high-speed random access. It can read and write data to specific locations, and can reference and retrieve a single byte. NOR flash memory is used to store cell phone operating system code and on Windows computers for the BIOS program that runs at startup. NAND reads and writes in small blocks. It is used in USB flash drives, memory cards (in digital cameras, MP3 players, etc.), and in SSDs. NAND provides higher bit density than NOR and greater write speed. NAND flash does not provide a random-access external address bus so the data must be read on a blockwise basis (also known as page access), where each block holds hundreds to thousands of bits.

\$\endgroup\$
6
  • 2
    \$\begingroup\$ Well, even RAM (Random Access Memory) is often not bitwise addressable, but it accessed in words. Does this mean it's not random-access by the quoted definition? \$\endgroup\$ – NPE Nov 30 '18 at 0:12
  • \$\begingroup\$ Good point, NPE. Of course RAM devices are random-access; so clearly, the addressable unit should not be an issue. Likewise, NAND devices are block-oriented and one can access any block at his/her will. Does this fact make NAND-based memories random-access? On the other hand, although read times are constant with RAM, scattered reads for NAND devices are slower than sequential reads. \$\endgroup\$ – Humberto Fioravante Ferro Nov 30 '18 at 0:19
  • 3
    \$\begingroup\$ I'm not sure I agree with this definition. They're using byte-addressable and random-access interchangeably, which doesn't make much sense to me. As @NPE points out, RAM is typically addressed in 64b increments, but no one says that's not random. \$\endgroup\$ – Nate S. Nov 30 '18 at 0:20
  • 2
    \$\begingroup\$ ...although read times are constant with RAM... No, not necessarily: en.wikipedia.org/wiki/Memory_refresh \$\endgroup\$ – NPE Nov 30 '18 at 0:20
  • 3
    \$\begingroup\$ But to take a step back, the answer depends critically on your exact definition of "random access" (and on the level of abstraction at which you're looking at this). \$\endgroup\$ – NPE Nov 30 '18 at 0:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.