3 ms·
Genuinely interested, do you have some pointers about what you mean by NT-style IO? How would you characterize it?
by makapuf 5y ago
Genuinely interested, do you have some pointers about what you mean by NT-style IO? How would you characterize it?
- spc476 5y agoPOSIX is ask first (can I do I/O?) then do, while NT is do, then ask (is it done?).
- phendrenad2 5y agoI 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.
- p_l 5y agoOne 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().
- deleted 5y ago[deleted]