Hacker News new | ask | show | jobs
by hnlmorg 21 days ago
> Really not possible as most of POSIX semantics arise naturally from the kernel (or are enforced/executed at the kernel level).

The kernels undoubtedly take different approaches. But there's nothing in NT that strictly prohibits POSIX compatibility layers. As we see with the many compatibility layers that have existed for Windows over the years.

> For instance the idea that "everything is a file"

POSIX doesn't have a concept of "everything is a file". That's Plan 9. UNIX and POSIX actually made numerous concessions here and there are plenty of constructs that are not exposed as a file.

Windows does already abstract a few primitives as files too. In fact even DOS has the concept of device files, though in typical Microsoft fashion, it's implementation was a clusterfuck that took MS 40 years to fix.

> or the single root filesystem layout (which iirc is segmented deeply at the kernel level).

NT uses an object system for filesystem objects, but it still has a root. As you can see in the WinObj (eg screenshot below)

https://learn.microsoft.com/en-us/sysinternals/downloads/med...

The C:\ convention is really more there for compatibility with DOS-lineage software but the underlying filesystem APIs work fine with NT objects.

For example, C:\foo.txt might be equivalent to \Device\HarddiskVolume3\foo.txt

In this regard, it's similar to how POSIX has a database of inodes and the filesystem hierarchy is actually just an abstraction that sits on top of that