News for hackers. Stuff that matters.
Re:Low level is easy (2008) by phendrenad2 on Thursday July 29, 2021 @04:30PM (#28001107)
But I think that even with all of that, writing an OS is still much easier than an accounting package. The way forward is paved smooth by hundreds that have gone before. And by that I mean, hundreds of Unix clones have been made and open-sourced. Things like microkernels and NT-style I/O architecture are esoteric things that you only see in the embedded world (which Google seems to be limiting Fuchsia to at the moment) and enterprise-oriented operating systems (like Windows, which home users only use out of a weird quirk of history).
Re:Low level is easy (2008) by pjmlp on Friday July 30, 2021 @02:22AM (#28005037)
A consequence of AT&T originally not being allowed to sell UNIX and the existence of the Annotated UNIX book.

Without it, UNIX would have been as esoteric as anything else and most likely would have died instead of sprung multiple clones.

Re:Low level is easy (2008) by makapuf on Thursday July 29, 2021 @06:27PM (#28002240)
Genuinely interested, do you have some pointers about what you mean by NT-style IO? How would you characterize it?
Re:Low level is easy (2008) by phendrenad2 on Friday July 30, 2021 @01:11AM (#28004700)
I was referring to the "David Cutler (designer of VMS & Windows NT) criticizing UNIX i/o architecture" comment above, which apparently refers to Dave Cutler's criticism of Unix as "Get a byte, get a byte, get a byte byte byte", which seems to me to refer to the Unix/Linux style of programming (in which programmers overuse things like getch() and putchar()). Whew.

But. There's another, much bigger difference between Unix and VAX/VMS/WinNT: The way I/O operations are handled in the kernel itself. In Unix systems, the kernel just passes I/O operations directly to the driver code, which immediately tries to do the operations on hardware. It's a very microcontroller-ish view of the world. WinNT treats I/O operations as sort of a "packet" which encodes the operation to be performed. That packet passes down through the layers of the kernel, including 3rd party modules and eventually drivers, until the operation is performed on hardware. Then, another packet percolates back up the stack to your app with the result.

Things like antivirus, dropbox, etc. can insert themselves into the stack and intercept/modify/reroute I/O operations and results globally.

I think that Linux probably has something like this, or you can probably cobble it together by using async I/O, io_uring, and/or eBPF.

Re:Low level is easy (2008) by p_l on Thursday August 05, 2021 @04:05PM (#28078933)
One thing to remember about it is how UNIX's I/O model is designed for 64kB total of memory space on simplistic mid-range (at best) computer. While trying to fit in concepts from 36bit Multics machine whose I/O primitive was equivalent of mmap().
Re:Low level is easy (2008) by spc476 on Thursday July 29, 2021 @08:05PM (#28003026)
POSIX is ask first (can I do I/O?) then do, while NT is do, then ask (is it done?).