Hacker News new | ask | show | jobs
by shruubi 3702 days ago
One thing I can't seem to find is, is this a true nodejs-based operating system in that it's all single threaded? single-threaded event loop stuff works well for network servers but an OS? To me it seems like a terrible idea.
5 comments

I'm going to have to assume it's using some form of Node's clustering support, which will let you run up to X instances where X is the maximum number of supported instances for the number of cores you have. Otherwise, you're right, bad combination.
What about something like ChromeOS? Does it need multi-threading?

If each app is running it's own thread, and can spawn new threads, maybe that would work.

Also, though Node.js is currently single-threaded, there is the Nexus project https://github.com/voodooattack/nexusjs which is doing multi-threaded javascript. Maybe this or Node.js will support multiple threads in the future.

Nashorn on the JVM supports threads. So the problem is definitely not a JS issue but a JS engine issue. NodeJS is single threaded because NodeJS V8 is. There was a talk about implementing workers that communicate view text messages though, I don't know the state of workers in NodeJS .
It's still based on the linux kernel.
I recently read about the SIMD support for Javascript. While parallelism and distributed systems contribute a lot to the OS, SIMD is something nice to have on top that. So, JS may be single threaded but having SIMD support might speed things up.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Why not? Many languages and Operating Systems used to be single threaded. Many still functionally are for a lot of things.

Of course it's still challenging but it's built on top of the Linux kernel so it's also not a pure NodeOS (which would probably be impossible).