3 ms·
Windows NT, just like any relevant operating in the last 30 years, operates on the same I/O to files abstraction as Unix. I'd say Windows NT does it even more t
by 4ad 15y ago
Windows NT, just like any relevant operating in the last 30 years, operates on the same I/O to files abstraction as Unix. I'd say Windows NT does it even more than modern Unix, at least in NT NICs are real devices in the namespace.
The BSD people in the '80s forgot this fundamental abstraction and introduced sockets, then X came, again neglecting 15 years of good practice and introduced a completely incompatible model to do I/O.
Rob Pike, Ken Thompson and other Unix people were dissatisfied with this and created Plan9, a Unix descendant where truly all I/O happens by operating on the namespace and without an ioctl(2) system call.
Many, including myself, believe Unix took a very wrong path in the 80s and that modern Unix is more clumsy and inconsistent than the systems it was designed to replace, but architecturally speaking Windows NT is pretty much the same as modern Unix.
/edit:
I've seen both in the cited article and in OPs link that people confuse files with files descriptors.
- drothlis 15y agoWhat does "operating on the namespace" mean?
- 4ad 15y agoTo do any kind of I/O you just open a file from that process namespace using a set of standard system calls. It doesn't matter what resource you're accessing (regular file, network, window on the screen, window on someone else's screen, etc), the interface to do so is the same. Compare that to using specialized APIs for different type of I/O, for example using the socket API to do networking, or to use special X libraries to do graphics programming, or to hide another API inside ioctl(2). Namespaces in Plan9 are not global, each process has a private namespace (though many processes share most of it) allowing the composition of interfaces. (/dev/tty in Unix is different for each process as well). Each graphics program on Plan9 writes to /dev/draw and reads from /dev/mouse and /dev/console, but those are synthetic files implemented by the window manager by multiplexing the framebuffer, mouse and console. As you can see even though the files are synthetized the names in the namespace are the same because namespaces are private for each application and the window manager binds the synthetic files to those names. /edit: Ah, and one more thing, file-based I/O means shell scripts can do everything a compiled program could do, like networking.
- geocar 15y agoWhat exactly do you mean by this? > at least in NT NICs are real devices in the namespace.
- 4ad 15y agoIn Windows NT device objects get instantiated in \Device, including network cards. Also, different TCP/IP layers are accessible as well, like \Device\Tcp, \Device\Ip. In Unix the network stack is not accessible in the file system at all, there's nothing in /dev, it's just a special API in the kernel. In Windows you'd use a networking API as well, but the networking API is a convenience layer over file based I/O. The difference between Windows NT and Plan9 is that Windows NT device I/O is IOCTL based, not composable, not replaceable and not exportable, but it's just how you'd do things in Unix v7.