Xref: news-dnh.mv.net comp.os.msdos.djgpp:136 Path: news-dnh.mv.net!mv!news.sprintlink.net!gatech!swrinde!pipex!sunic!sunic.sunet.se!news.uni-c.dk!diku.dk!terra From: terra AT diku DOT dk (Morten Welinder) Newsgroups: comp.os.msdos.djgpp Subject: Re: fork()/join() Date: 5 Jun 1995 17:38:21 GMT Organization: Department of Computer Science, U of Copenhagen Lines: 27 Sender: terra AT tyr DOT diku DOT dk References: <3qlh05$kcn AT odin DOT diku DOT dk> <3qv6e7$h59 AT jabba DOT ess DOT harris DOT com> Nntp-Posting-Host: odin.diku.dk To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp 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