Why are they putting "processors" on hard drives?

Solution 1:

Well, HDD always had processors, mainly to cache data and do other HDD stuff like marking bad blocks etc.

The Netgear product you linked is a NAS, which allows you to stream media from it over the network, so it's not really a HDD. It's more like a network connected HDD with some fancy software to allow you to stream information over the network.

Old routers also had processors, though they used to be slow and not advertised at all. The WRT54G, which came out in 2002 had a Broadcom BCM4702 running at 125Mhz. Not very fast indeed. However, these days we demand more from the routers, and features such as VPN require faster processors.

Solution 2:

I don't understand - the CPU on the computer is the processor and the hard drive transfers its contents to the host computer's RAM. Do additional processors pre-process the data somehow?

The CPU is a processor; there are others. A processor is what runs program code, so any device that has firmware (which is code) has a processor of some sort.

A hard drive has its own (small) processor running firmware that implements an interface protocol (e.g. SATA or SCSI) and controls the drive's motors. Think of your hard drive as a specialized computer-within-a-computer; the SATA cable is like a network cable that lets it communicate with the "main" computer. The CPU creates messages (such as SATA command packets) to tell the drive what data it wants, and sends them to the drive through the cable; the drive's processor looks at the messages from the CPU, and controls the drive's motors and magnetic heads to actually read or write the data.

A NAS is a computer running file-server software. In principle it's no different from setting up shared folders on your PC; the NAS is running a more lightweight operating system on a slower processor, but doing essentially the same work. Same goes for a router.

Solution 3:

If you could look in detail at the workings of a typical desktop PC, you'd find processors all over the place. If you have a keyboard and mouse connected to USB ports, there's a processor inside the keyboard and one inside the mouse speaking the USB protocol.

In the case of a hard drive, there's a ton of things for that processor to do. For one thing, the processor has to position the head, wait for the right moment, and then send the data out to the platters. When the CPU asks to read a bunch of data, the processor finds the optimum order to retrieve that data from the disk, and maybe even fetches some extra data that happened to pass under the head to put into cache in case the CPU asks for it next.

Modern hard drives can also do SMART health checks in the background. The CPU doesn't have to concern itself with these things, other than possibly to ask for the results periodically.

Modern SoHo "routers" aren't just routers. They're also access points, switches, DHCP servers, web servers, and they implement NAT, firewalling, sometimes even NAS functions, and a ton of other things. Their processors have tons of work to do.

Basically, a processor is so cheap to implement these days that they're used in almost any case where they make sense. The exception would be cases where the task is very simple or where high performance is required. Heck, there's probably even one in your power supply to manage fan speeds and optimize power consumption.

Solution 4:

Many current "smart" appliances are in fact full-fledged computers, often running some clone of Linux. If the device is permissible enough, or has been rooted/jailbroken, you might be able to tinker with it, install new packages or even change the OS. They of course use CPUs.

Examples include phones, TVs, DVD players, e-book readers, NAS boxes, home routers, modems and out-of-band management in servers, which are in fact whole computers with their own OS.

But even dumb devices have processors, often called microcontrollers, responsible for e.g. reading and writing data. Micro SD card in your phone contains a processor and a SIM card has another, capable of running Java applications.

Even simple children toys, like a traffic light, have microntroller, as it is easier and cheaper to implement the light logic in microcontroller's software than in discrete components.

Solution 5:

To answer your specific question about hard disk drives which no one seems to have addressed.

SATA (and all other disk attachment interfaces I can think of) works with blocks. Commands are defined to (among many other things) read and write specific physical storage blocks, and the data is provided over the attachment interface cabling. That command must be processed somewhere, which can be done either in software which runs on an on-board processor or using some sort of pure hardware setup which probably would need to do much the same thing.

Guess what's cheaper, physically smaller, far from unlikely easier to work with, and usually much more versatile? That's right, a processor, a small amount of program memory (flash, EPROM, ROM, or whatever else fits your needs) and a small amount of RAM, the latter two of which if your needs are modest enough might even be included within the processor itself (see for example the PIC family of microcontrollers).

Also, remember that the disk platters don't actually store bits. They store magnetic flux encodings of bits. Something must process the flux readings coming from the read head, or process the data into flux transitions to be given to the write head. If a read is imperfect, then error correction data (stored along with the data) is used to ideally (this is unfortunately not always the case) correct the error and return good data rather than garbage, or return an error if the problem is too severe to be correctable. Again, that's easiest to implement in software which must run on something, and a processor with some memory again fits the bill quite nicely.

Having lots of processing power on-board means that you are able to use more advanced encoding and error recovery schemes, which in the case of hard disks means that you can cram more data onto the same physical surface area. The end result is a larger storage capacity for you than what would otherwise be possible. The processing power of the hard disk microcontroller itself, however, is not of critical importance to the user of the drive.