moonshot

technical

jakel

jakel is the filesystem. files and directories live in memory as a tree, and an ata pio driver underneath saves the whole tree to a raw disk image, so files survive reboots.

nodes and paths

every file and directory is a node in a fixed-size table, with a type, a name, a parent and its contents. the root directory is node zero. file contents live in an 8MB arena of their own, so a large file cannot crowd out the kernel's own memory.

paths are slash-separated. an absolute path starts with /, anything else resolves from the current working directory, and .. goes up one level.

shell

on disk

sync writes the whole filesystem to the disk, a superblock, the node table and the file data, and the next boot loads it back. a fresh filesystem is saved at once, so the second boot always loads from disk.