News for hackers. Stuff that matters.
Re:COBOL programmers answer call by rbanffy on Friday April 10, 2020 @08:33PM (#22838759)
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.

Re:COBOL programmers answer call by gumby on Friday April 10, 2020 @08:52PM (#22838850)
Actually 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.

Re:COBOL programmers answer call by DonHopkins on Saturday April 11, 2020 @05:01AM (#22840542)
If /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.
Re:COBOL programmers answer call by rbanffy on Saturday April 11, 2020 @07:07AM (#22841049)
Great 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.

Re:COBOL programmers answer call by gumby on Saturday April 11, 2020 @12:26PM (#22842467)
Star 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!

Re:COBOL programmers answer call by zozbot234 on Friday April 10, 2020 @09:20PM (#22839000)
These 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.
Re:COBOL programmers answer call by rbanffy on Saturday April 11, 2020 @04:48AM (#22840498)
Those controllers are still designed prioritizing cost over performance most of the time.
Re:COBOL programmers answer call by gumby on Saturday April 11, 2020 @12:28PM (#22842476)
Well 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.