Hacker News new | ask | show | jobs
by jtotheh 783 days ago
UNIX etc has all file access start from /. DOS/Windows has separate trees starting with different letters. I think having it all in one tree structure has some advantages. All paths can be expressed as relative paths, for instance.
3 comments

Windows kind of does have that. They call it the global catalog or Win32 Device Namespaces.

somehow C: is easier to type than \\?\GLOBALROOT\Device\HarddiskVolume2\ or \\?\GLOBALROOT\Device\Harddisk0\Partition2\ or even \\?\Volume{1ab2d2f9-230f-4c63-bc25-163c085334df}\ though.

VMS also has separate trees for different logical volumes.
VMS is a good example of a system that uses very un-UNIX-like file naming conventions, with ::, :, [], ., and ; used as separators for different path components:

https://wiki.vmssoftware.com/File_specification

Additionally, VMS has versions of files following a semicolon.
I think having one tree is a huge advantage. take the windows registry, on paper it sounds like a great idea. "lets make a single unified database to hold all config values" In reality, it sort of sucks. One of the reasons it is so unpleasant to use. Is that now you have another tree with different special access patterns and programs that are incompatible with your main tree(or trees in the case of windows).

I really like the plan 9 ethos here, which can be summed up as "does it vaguely look like a tree? if yes, put it in the file system". My favorite one was html "Hmmm... An html document is tree structured.... hey guys lets make our web browser a filesystem driver. (enthusiastic clapping)". Having said that, having no mainstream browser on plan9 is what usually keeps me from using it. I keep telling myself that avoiding the web drivel that requires a mainstream browser would make me a happier person, but I keep coming back for more.

> I really like the plan 9 ethos here

Well, me too, but it is 2024 and we have half a dozen technologies that let us put a few terabytes of non-volatile directly-accessible memory on the CPU memory bus.

Isn't it maybe time we relegated the technology of sequentially-accessed disk storage -- including SSD -- to legacy status, like tape drives, and stopped thinking about files and folders at all?

We are one quarter of the way through the 21st century. "Disk drives", including flash memory pretending to be disks, is legacy tech. We do not need filesystems any more. Let's move on and banish this to VMs holding legacy OSes for backwards compatibility with existing workloads.

A "filesystem" is really just a key:value store, in the unix system the key is hierarchical and each value can have more than one key. The real unix innovation was to combine all such stores present on a system into one tree. The point is to have a nice human accessible address to get your data at.

Now, theoretically, all memory access on the system could be done via one simple api. and as plan9 showed most IO can be done via that same api. It is sort of like having all networks be IP or all protocols be HTTP. The implementation may not be ideal but having that narrow waist is a huge quality of life improvement.

Realistically, it is only used for items that need to persist outside of a processes run cycle.

There are useful simplifications, and over simplifications.

As in a cartoon I once saw: two cats are talking, and one says of the human they're looking at: "it's a box of electronics, and when he presses buttons on the front, it flashes little coloured lights on that panel at him. It keeps him occupied for hours."

It's true and 100% accurate, but it's not at all precise.

It doesn't matter what kind of store it is. What matters is that it is an indirection mechanism designed for computers which were unable to access large amounts of directly-addressible non-volatile store.

Computers no longer suffer from this restriction, but all current OSes are built around this abstraction, and it cripples them.