roadmap

Milestone 47 appendix: absolute paths and bind

An appendix to milestone 47 (navigation and naming). The page is complete without it. It holds how absolute paths resolve and how bind composes a namespace.

Absolute paths: Plan 9's answer, not DOS's

/ is the root of your own namespace. Plan 9 kept absolute paths and made / the root of your namespace, assembled from what you were given, so two processes can both open /lib/foo and get different files. The system that took namespaces furthest did not abolish paths, it made them personal. That lines up with "every shell has its own root" in the main page's earned divergences.

A path as authority (open() resolving against a namespace nobody granted you) is out permanently. A path as a name (a string, and a name is not a capability) survives.

The resolver lives in the client, not the FS server. A server that walked multi-component paths would put path-walking back into a server, against the discipline of §27 (the filesystem service) that open-by-path exists only inside the server relative to one bound directory. In the client, the server still only ever sees a single-component name relative to a capability presented to it, and no server learns a name it did not already own. The namespace is another endowment, inspectable in caps, which Unix cannot offer, since you cannot enumerate what your paths could reach.

How it works:

The properties that follow:

The cost is that two processes, or two shells with binds, see different files at one path. That is powerful and confusing, and Plan 9 users will attest to both halves.

bind is not blocked on a mount table. It is blocked on a second grant

bind is how §50 (namespace composition, bind, not stored paths) composes a namespace. The shell builtin is bind <target> <name>, in mkdir's category: it mints no capability and spawns nothing.

kernel::user::shell_navigation_tests proves it over the real wire on both ISAs. A bound name lists the real directory it points at (ls). Three cd ..s from inside it reach the real parent, the real root, and refuse there exactly where a direct walk to that depth would.

The mount table is the cheap half. The case that pays for the mechanism is a union of two grants: /photos from one caretaker and /backups from another, in one process, with neither able to name the other's parent. With one grant, every bind is an alias inside one tree.

That case is host-tested in grant_plan but not guest-provable. Nothing tells a live swish process it holds a second directory capability (_start's three START words are spoken for), and both real init entry points pass second_dir: None. fs_service::start_granted_dir starts one caretaker and hands one endpoint; a second needs a second caretaker, a second slot and a spawn-protocol position. That is milestone 154's open gap, an endowment question (environment.md explains why that category is expensive), and what the second directory should be is a boot-time policy call for an architect.