Hacker News new | ask | show | jobs
by nigerianbrince 1327 days ago
Multitasking can go to hell I guess.
4 comments

Generally speaking multi-tasking includes both multi-processing and multi-threading. Many unikernel projects support multi-threading so languages like Go/Rust can work very very well when deployed as unikernels. As for scripting languages like javascript, python, ruby they are inherently single-process regardless so you have to horizontally scale those. (eg: instead of having N servers having nginx front-end X app servers you just right size your workloads and spin up as many app servers you need behind a load balancer)

There's only one project I'm aware of that does multi-processing: https://cybersecurity.springeropen.com/articles/10.1186/s424... .

Why? You can easily implement a scheduler. And there's multiple cores. And potentially multiple instances on the hypervisor.
"Easily" is doing a lot of work there.
Yeah I re-read it later and was like.. ok, fine, I should put "easily" in quotes ;-)

Still, it's entirely feasible.

I mean, if you have one task to do only, multi-tasking is kind of pointless yes
It is nice to be able to listen to a podcast in the background while playing a game, and have the sound come out the same speakers/headphones. It's much harder to do that if the game runs bare metal.
Each of those services can be a unikernel being managed by a type 1 hypervisor.
Absolutely. But I think I'm correct in saying if today I wanted to play a game shipped as a unikernel, it would be pretty difficult to have the game and spotify running. First we need a spotify unikernel, then we need people to accept having to use the new unikernel version of spotify just when they play the game(s), maybe get used to the spotify unikernel not having access to graphics hardware, etc. Or we run spotify in a traditional OS in the hypervisor and lose all the benefits we were shooting for in the first place.

Technically all manageable, but that wasn't the aspect I was focusing on, rather the reality that we couldn't just do this today, or even really all that soon.

Alternatively, PCs become games consoles when running games, and you just can't do multitasking, just like you mostly can't on a PS2, etc. Honestly, I think this would be the most likely outcome if games went down this road.

In a way it is a return to the days of playing games in 8 and 16 bit platforms. :)
Define multitasking :)

There was a company (sadly defunct) that was building Erlang unikernels, and you can't say Erlang doesn't have multitasking.