I/O Is Faster Than CPU – Let’s Partition Resources and Eliminate OS Abstractions [pdf]
Mainframe designers had this problem under control by 1970. Mainframes had, and have, &quot;channels&quot;. A channel is part of the processor architecture. It takes commands, sends them to a peripheral, and manages the data transfer in both directions. Channels have some privileged functions through which the OS tells them where the data is supposed to go in memory. The architecture of channels is well defined, and peripherals are built to talk to channels. The CPU has I&#x2F;O instructions to control channels in a well defined way.<p>The peripheral never has access to main memory. There is no peripheral-controlled &quot;direct memory access&quot; (DMA). So it&#x27;s possible to give control of a channel to a userland program without a memory security risk.<p>Minicomputers of the 1970s had low transistor counts and slow CPUs. So peripherals were usually put directly on the memory bus, with full access to memory. I&#x2F;O operations were performed by storing into memory addresses, which caused bus transactions detected by the peripheral device. There were no CPU I&#x2F;O instructions.<p>Microprocessors copied the minicomputer model. IBM&#x27;s people knew this was a bad idea, and in the IBM PS&#x2F;2, they introduced the &quot;microchannel&quot;. Peripheral vendors, facing a new architecture that required more transistors, screamed. IBM backed down and went back to bus-oriented peripherals.<p>That model persists today, even though the few thousand transistors required for a channel controller are nothing today. Even though most modern CPUs have I&#x2F;O channel like machinery, it&#x27;s exposed to the program as registers the program stores into and memory accesses by the peripheral device.<p>So there&#x27;s no standardization on how to talk to devices at the hardware level. Some CPUs have protection systems, an &quot;I&#x2F;O MMU&quot;, and there have been various channel-like interfaces, especially from Intel, but they have never caught on.<p>Instead, we mostly have heavy kernel mediation between the hardware and the user program. And way too many &quot;drivers&quot;. This has become a problem with &quot;solid state disk&quot;, which is really a random access memory device that doesn&#x27;t write very fast.  Mostly, it&#x27;s used to emulate rotating disks.<p>Samsung makes a key&#x2F;value store device which uses SSD-type memory devices but manages the key&#x2F;value store itself. But you need a kernel between the device and the user program. You can&#x27;t just open a channel to it and let the user program access it.