Mail Archives: djgpp/1995/06/05/17:41:14
azimmer AT rsa DOT hisd DOT harris DOT com (Alan D Zimmerman) writes:
>> fork(), btw, is going to be a pig since it will have to copy the
>> entire running process. The multi-tasking exec's will behave much
>> better.
>Why? I have written programs in Ada using Meridian OpenAda DOS that
>supports tasking and runs just fine on an 8086/8088, and 80286 under
>DOS. I know this is a DJGPP (which supports GNAT) newsgroup and not
>an Ada newsgroup, but your comments are not necessarily true, it doesn't
> have to run like a pig.
I don't know the relavant primitives of ADA, but with fork()
the semantics is such that each branch gets it own copy of
all memory, (specified) file handles, and a zillion other
things. There a big difference here between multi-threading
and multi-tasking. I think ADA only supports the first.
The reason it is not a pig under your normal unix is that
there you can do copy-on-write for memory, so most of the
memory will not actually get copied.
We can't do copy-on-write on DPMI 0.9; Some DPMI 1.0 hosts
may (it's optional) support it.
Morten
- Raw text -