Live data from Hacker News

MotorOS: a Rust-first operating system for x64 VMs

github.com

41–50 of 125 posts

Re: MotorOS: a Rust-first operating system for x64 VMs

#41
It could be cool if there was a WASM container built in Rust that could run in this OS. I don't really have a sense of how complicated a WASM container is, though it seems non-trivial to even decide what such a thing is, so it would be nice not to treat the WASM container itself as the OS (i.e., more room to safely experiment). WASM also seems like it dodges the ABI issue by being more explicitly about composition instead of shared binary data structures.

Re: MotorOS: a Rust-first operating system for x64 VMs

#42

Out of curiousity, why would a small kernel take a whole 200ms to start on a modern computer? Wouldn't it need to initialize some metadata for the memory pages, mount the filesystem, and try to launch an init process? I suppose there might be an ethernet driver and possibly something to pipe logs to ("stdout" for the VM) to initialize. Shouldn't that all take a few microseconds? Or is all the slowness in the host pre…

[deleted]

Re: MotorOS: a Rust-first operating system for x64 VMs

#43

> Nix OS all exist because of Linux's complexity That said, I would be thrilled to build this and other alt OSes and their userlands with Nix / Nixpkgs :).

> because of Linux's complexity

Linux is not complex but there are some design issues with C ABI and glibc stability and symlinks.

Re: MotorOS: a Rust-first operating system for x64 VMs

#44

It could be cool if there was a WASM container built in Rust that could run in this OS. I don't really have a sense of how complicated a WASM container is, though it seems non-trivial to even decide what such a thing is, so it would be nice not to treat the WASM container itself as the OS (i.e., more room to safely experiment). WASM also seems like it dodges the ABI issue by being more explicitly about composition in…

When you say wasm container, you mean something like wasmtime that provides a non-browser wasm runtime?

https://github.com/bytecodealliance/wasmtime

Re: MotorOS: a Rust-first operating system for x64 VMs

#45

Out of curiousity, why would a small kernel take a whole 200ms to start on a modern computer? Wouldn't it need to initialize some metadata for the memory pages, mount the filesystem, and try to launch an init process? I suppose there might be an ethernet driver and possibly something to pipe logs to ("stdout" for the VM) to initialize. Shouldn't that all take a few microseconds? Or is all the slowness in the host pre…

In general, lots of hardware requires long waits to initialize. As in, program a value then you must wait 50 ms before querying the registers or the hardware will give you non-deterministic garbage with no error indication.

So, it depends on the hardware, though you are unlikely to need more than 1 second on anything other than truly degenerate hardware assuming you are initializing devices in parallel.

Re: MotorOS: a Rust-first operating system for x64 VMs

#46

Sounds interesting, but it also reminds me of what Linus once said when asked about fearing competition. From my memory his answer was something like: I really like writing device drivers. Few people like that and until someone young and hungry comes along who likes that I'm not afraid of competition.

You don't need very many device drivers to run in a VM. The real question is, how useful is a non-C-compatible, non-Linux-compatible, VM-only OS. Maybe a little bit, for microservices?

Is this really non-C-compatible? Seems like it just needs a libc layer written in rust. Most C programs don't make syscalls directly anyways (on some OSes they aren't even able to). The rest of the question is definitely fair though.

Re: MotorOS: a Rust-first operating system for x64 VMs

#47

Out of curiousity, why would a small kernel take a whole 200ms to start on a modern computer? Wouldn't it need to initialize some metadata for the memory pages, mount the filesystem, and try to launch an init process? I suppose there might be an ethernet driver and possibly something to pipe logs to ("stdout" for the VM) to initialize. Shouldn't that all take a few microseconds? Or is all the slowness in the host pre…

4 months ago we had FreeBSD booting in 25ms. That gives some insight where the bottlenecks might be: https://news.ycombinator.com/item?id=37319180

Re: MotorOS: a Rust-first operating system for x64 VMs

#48

Sounds interesting, but it also reminds me of what Linus once said when asked about fearing competition. From my memory his answer was something like: I really like writing device drivers. Few people like that and until someone young and hungry comes along who likes that I'm not afraid of competition.

You don't need very many device drivers to run in a VM. The real question is, how useful is a non-C-compatible, non-Linux-compatible, VM-only OS. Maybe a little bit, for microservices?

According to The American Heritage Dictionary an operating system is:

"Software designed to control the hardware of a specific data-processing system in order to allow users and application programs to make use of it."

The question is how much Operating System is a software that delegates all "control the hardware" parts to the layer below.

I know there are wider definitions of OS, but my point is this is not going to replace Linux.

Without question projects like MotorOS are sill useful. Besides practical applications it's a nice idea. Just recently I wrote in another thread that I would love to have a glimpse into an alternative universe, where Pascal had won over C and everything was Pascal-based. The idea to have everything Rust-based is even more exciting.

Re: MotorOS: a Rust-first operating system for x64 VMs

#49
post #7

Earlier quoted context omitted.

Everything is relative of course but it's a consensus view in OS literature that the Unix family of operating systems doesn't have strong security. There's a huge TCB in which bugs lead to vulnerabilities with high probability, as we see all the time. This is why eg cloud providers don't rely on the OS to isolate customers from each other. Since the reneissance of virtualization, many security focused systems have bu…

Idk if it's "the Unix family". Clouds are running with SmartOS for example with containers running on bare metal and I've not heard of security issues with this model.

SmartOS is a fork of OpenSolaris right? Solaris used to have its share of public vulnerability discourse when it had more users, and it quieted down as the user base shrank and people stopped deploying it as a general purpouse server OS. In a slow moving niche OS I wouldn't put much weight on low volume of public security problem discourse especially in face of apparent architectural problems.

Re: MotorOS: a Rust-first operating system for x64 VMs

#50
post #45

Out of curiousity, why would a small kernel take a whole 200ms to start on a modern computer? Wouldn't it need to initialize some metadata for the memory pages, mount the filesystem, and try to launch an init process? I suppose there might be an ethernet driver and possibly something to pipe logs to ("stdout" for the VM) to initialize. Shouldn't that all take a few microseconds? Or is all the slowness in the host pre…

In general, lots of hardware requires long waits to initialize. As in, program a value then you must wait 50 ms before querying the registers or the hardware will give you non-deterministic garbage with no error indication. So, it depends on the hardware, though you are unlikely to need more than 1 second on anything other than truly degenerate hardware assuming you are initializing devices in parallel.

But it’s only for VMs. So what hardware are you initializing?
Post reply on HN