home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!swrinde!mips!newsun!cpclark2.Test.NPD.Provo.Novell.COM!dliechty
- From: dliechty@novell.com (Don Liechty)
- Newsgroups: comp.os.os2.advocacy
- Subject: Re: nt, an assessment
- Message-ID: <dliechty.1.712274784@novell.com>
- Date: 27 Jul 92 22:06:24 GMT
- References: <1992Jul23.2712.2814@dosgate> <1992Jul24.010711.1625@grebyn.com> <1992Jul27.161801.3357@njitgw.njit.edu>
- Sender: usenet@novell.com (The Netnews Manager)
- Distribution: comp
- Organization: Novell, Inc., Provo, UT, USA
- Lines: 59
- Nntp-Posting-Host: cpclark2.test.npd.provo.novell.com
-
- In article <1992Jul27.161801.3357@njitgw.njit.edu> dic5340@hertz.njit.edu (David Charlap) writes:
- >From: dic5340@hertz.njit.edu (David Charlap)
- >Subject: Re: nt, an assessment
- >Date: 27 Jul 92 16:18:01 GMT
-
- >In article <1992Jul24.010711.1625@grebyn.com> richk@grebyn.com (Richard Krehbiel) writes:
- >>
- >>As far as I understand, there's not a way in OS/2 to implement fork().
-
- >Correct, although the functionality of fork() exists in the form of
- >two separate API calls: DosCreateProcess, and DosCreateThread (I think
- >those are the names). One launches a new program, and the other
- >begins a parallel thread of execution.
-
- >The Unix fork() combines thse. When a process does a fork(), a second
- >thread is launched. The second thread executes the same code as the
- ^^^^^^
-
- Not quite true. It is not a thread, it is a seperate process identical
- to the first.
-
- >parent, and from the same instruction. The only difference is that
- >the child gets a 0 as a return value from fork(), and the parent gets
- >the process ID of the child. If the child executes another program
- ^^^^^^^
-
- Correct!
-
- >(via exec(), which replaces the calling process with the program just
- >called), then you've just launched a new process. If the child
- ^^^^^^^^^^^
-
- The new process was created at the time of the fork, and then replaced
- by exec().
-
- >branches to a procedure, you've just launched a new thread.
- ^^^^^^^^^^
-
- Again, it is not a thread. It is a seperate process identical to
- the first, which could have a different path of execution based on
- whether the return code is the process ID of the child (in the case of the
- parent) or 0 (in the case of the child). That is precisely why they call
- them parent and child (processes).
-
-
- >Obviously, there are some other differences, but this is why OS/2
- >can't fork().
-
- >--
- > |) David Charlap "I don't even represent myself
- > /|_ dic5340@hertz.njit.edu sometimes so NJIT is right out!.
- > ((|,)
- > ~|~ Hi! I am a .signature virus, copy me into your .signature file.
-
- The concept of a thread historically has not existed in UNIX, but I
- have heard that later versions (System V 4.2 ??) do support threads.
- Anyone know for sure?
-
- Don Liechty
-