Fomos: Experimental OS, built with Rust
&gt; In Fomos, an app is really just a function. There is nothing else ! This is a huge claim. An executable for a Unix or Windows OS is extremely complex compared to a freestanding function.<p>I&#x27;m curious what Fomos uses as a distinction between &quot;process&quot; and &quot;executable.&quot;<p>On Linux a &quot;process&quot; is the virtual address space (containing the argv&#x2F;envp pointers, stacks, heap, signal masks, file handle table, signal handlers, and executable memory) as with some in-kernel data (uid, gid, etc) that determine what resources it is using and what resources it is allowed to use.<p>An &quot;executable&quot; is a file that contains enough bits for a loader to populate that address space when the execve syscall is performed.<p>One of the distinctions is that you do not need an executable to make a process (eg, you can call clone3 or fork just fine and start mucking with your address space as a new process) and while the kernel uses ELF and much of the userspace uses the RTLD loader from GLIBC you don&#x27;t need to use either of these things to make a process in a given executable format.<p>And finally, a statically linked executable without position independent code is &quot;just a function&quot; in the assembler sense, with just enough metadata to tell the kernel&#x27;s loader that&#x27;s what it is. But without ASLR to actually resolve symbols at runtime, it&#x27;s vulnerable to a lot of buffer overflow attacks if the addresses of dependency functions are known (return to libc is one of those, but it&#x27;s not unique).<p>I&#x27;m the first to point out the flaws in glibc and want an alternative to the Posix model of processes (particularly in the world where the distinction between processes, threads, and fibers is really fuzzy and that is clear even within Linux and Windows at the syscall level), but I&#x27;m curious what is going on in Fomos. Most of the complexity in &quot;executables&quot; in Unix is inherent (resolving symbols at runtime is hard, but also super useful, allowing arbitrary interpreters seems annoying, but is one of the strengths of Linux over Windows and MacOS, providing the kernel interface through stable syscalls is actually the super power of Linux and a dynamic context either through libc or a vtable to do the same thing is not that great, etc).