3 ms·
On a related note, the Plan 9 system call rfork() gives a system call by which you can create new processes or lightweight processes(threads) with a single syst
by vinutheraj 17y ago
On a related note, the Plan 9 system call rfork() gives a system call by which you can create new processes or lightweight processes(threads) with a single system call, deciding on what resources are to be shared between the new processes. There are no 2 discrete entities called processes and threads, just processes !
"In Plan 9, fork is not a system call, but a special version of the
true system call, rfork (resource fork) which has an argument
consisting of a bit vector that defines how the various resources
belonging to the parent will be transferred to the child. Rather
than having processes and threads as two distinct things in the
system, then, Plan 9 provides a general process-creation primitive
that permits the creation of processes of all weights." - Rob Pike.
You can read more about it here - http://groups.google.com/group/comp.os.research/browse_thread/thread/a7f0d27ad2af5a26/c9d4071bf0e2ae4c?lnk=gst&q=Rob+Pike&rnum=10 http://groups.google.com/group/comp.os.research/browse_threa...
- caf 17y agoThat's actually how fork() is implemented today on Linux, too - the clone() system call can be used to implement either processes or threads (by specifying exactly what is to be copied and what is to be shared), and modern versions of glibc implement fork() by calling clone().
- Aegean 17y agoSo does the widely known OS called linux. man clone
- vinutheraj 17y agoYea but I had heard somewhere that the linux clone was based on Plan 9 rfork. "FreeBSD's rfork(2) and Linux's clone(2) system calls are modeled on Plan 9's rfork(2)" source - http://catb.org/esr/writings/taoup/html/plan9.html http://catb.org/esr/writings/taoup/html/plan9.html
- jacquesm 17y agoPlan 9 still is in many ways the most interesting thing to happen to the world of systems design after unix. It deserves more attention.
- skwiddor 17y agoIt gets plenty of attention. IBM runs it on Blue Gene. LANL run it on their cluster. There's about 50 active posters to the 9fans mailing list. Features are regularly poorly copied to Linux (rabbit shaped peg, penguin shaped hole). Plenty of people say "how can usermode be fast" and yet Coriad use it in their AoE enterprise disk products, of which there are over 1000 installations afaik (I'm not a Coriad rep). I also earn my living plan9 & inferno programming and I know at least 10 other people who are equally blessed (not all at the same place as I).