Hacker Newsnew | comments | ask | jobs | submitlogin
vinutheraj 1658 days ago | link | parent

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_threa...



caf 1658 days ago | link

That'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 1658 days ago | link

So does the widely known OS called linux. man clone

-----

vinutheraj 1658 days ago | link

Yea 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

-----

jacquesm 1658 days ago | link

Plan 9 still is in many ways the most interesting thing to happen to the world of systems design after unix.

It deserves more attention.

-----




Lists | RSS | Bookmarklet | Guidelines | FAQ | DMCA | News News | Feature Requests | Bugs | Y Combinator | Apply | Library

Search: