3 ms·
Is it possible to have a threading model without an OS kernel? In other words, is it possible to package the rust runtime with an embedded execatable and run th
by saosebastiao 12y ago
Is it possible to have a threading model without an OS kernel? In other words, is it possible to package the rust runtime with an embedded execatable and run threaded software without the OS? Or does threading inherently require the OS to do the thread scheduling, etc.?
- dexen 12y agoPlan 9's libthread [1] implements cooperative threading entirely in userspace library. This is apart of Plan 9's fork() [2] syscall which allows both forking processes and creating kernel-level threads. Thanks to libthread being orthogonal to processes, it turned out to be easily portable. [1] http://man.cat-v.org/plan_9/2/thread http://man.cat-v.org/plan_9/2/thread [2] http://man.cat-v.org/plan_9/2/fork http://man.cat-v.org/plan_9/2/fork -- this is what linux' clone(3) syscall was modeled after.