Re: Threads in linux.

Richard B. Johnson (root@chaos.analogic.com)
Mon, 23 Aug 1999 09:09:32 -0400 (EDT)


On Sat, 21 Aug 1999, Peter Samuelson wrote:

> [Ferdinand Prantl <prantl@ff.cuni.cz>]
> > Cygwin has his own fork() and clone() implementation but it's a lot
> > slower than win32 API for threads. I don't know why ...
>
> You know how on Unix we implement spawn as fork+exec? Well, according
> to Cygwin docs, they have to do the opposite: they implement fork as
> spawn+exec! Along with a lot of weird code glue between "parent" and
> "child" to get the POSIX semantics right. It's butt-ugly, no doubt.
> Having read all that I understand why VMS used spawn to halfheartedly
> emulate vfork+exec (the vfork just set a flag or something, the exec
> did the spawn) and didn't [AFAIK] bother trying to implement a true
> fork at all.

VAX/VMS spawn is not related in any way to the Unix notion of spawn.
In VAX/VMS, one can create a process without copying the parent. The
newly created process can directly execute a program file once created.
This is the VAX/VMS notion of spawn. The DCL "SPAWN" command executes
the create process library call with the command interpreter (DCL.EXE)
as the program to be executed, and the command-line parameters entered
by the user. Its Unix functional equivalent is (command-line) "sh
command-file" or (C-program) system("command"); However, functional
equivalence aside, internal to the Operating System, they are not the
same.

Cheers,
Dick Johnson
**** FILE SYSTEM WAS MODIFIED ****
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/