3 ms·
It's quite clever, actually. Offloading specialized work to autonomous subsystems allows the CPU to run your code better than it would if the CPU also had to de
by rbanffy 7y ago
It's quite clever, actually. Offloading specialized work to autonomous subsystems allows the CPU to run your code better than it would if the CPU also had to deal with reading from disk or assembling packets for the network. A modern mainframe has tons of such systems and that's what allows them to process volumes of transactions that PC-based servers of the same price range can't.
In fact, our PCs are like that because they had to be cheap and the cheapest way is to burden the CPU with all work.
- gumby 7y agoActually I’d disagree a bit with your last sentence. Handling io interrupts in the kernel was a property of cheap machines like minicomputers that you could buy for a few hundred $k or less. You typically couldn’t afford extra channel controllers on cheap machines like that. Hence Unix’s I/O architecture was driven by the constraints of the PDP-7. Multics has a standard io controller architecture. PCs of course had the same issue — down to the cpu controlling the speed of disk rotation! But a modern PC has an I/O system more complex than the mainframes of old, with network interfaces that do checksum processing, handling retransmission and packet reassembly etc, just DMAing the result. Disk drives, whether spinning or SSD have a simple, block interface unrelated to what the storage device is doing, etc. I think this is all as it should be, though I personally consider the Unix IO model grossly antiquated.
- DonHopkins 7y agoIf /dev/zero is an infinite source of zeros, then why doesn't the minor device number specify which byte to use? Then you could make character special file /dev/seven that was an infinite source of beeps! There have been so many times I needed that.
- rbanffy 7y agoGreat idea! Also, for when you need some paper, you can pipe /dev/twelve to your printer. We should propose a kernel patch for this next April. Extra credit if we get it rolled into POSIX.
- gumby 7y agoStar Wars is more advanced and had this. How do you think R2D2 wasn’t cut from that film? He had an advanced case of Tourette’s so everything had to be beeped out. Imagine if they’d run out of beeps during filming!
- zozbot234 7y agoThese days, the "autonomous subsystem" is a microcontroller at the other end of a USB, SATA or PCI bus. Modern network cards also need to perform most of their packet-assembly operations on device and not in the kernel, or they would never reach their advertised max bandwidth.
- rbanffy 7y agoThose controllers are still designed prioritizing cost over performance most of the time.
- gumby 7y agoWell it’s system cost — the controllers take the high frequency interrupts, not the cpu. As for BOM...a few years ago we designed a big serial board (industrial control) and found it was much cheaper to buy AVR cpus and use just the onboard UARTs than to buy UART chips.