*BSD News Article 57543


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!news.kei.com!nntp.coast.net!torn!nott!bcarh189.bnr.ca!bmerhc5e.bnr.ca!bcrkh13.bnr.ca!news
From: Will Packard <will@nt.com>
Newsgroups: comp.unix.bsd.freebsd.misc,comp.unix.advocacy
Subject: Re: Win32 CreateThread() vs Unix fork()
Date: 21 Dec 1995 16:53:30 GMT
Organization: Northern Telecom
Lines: 29
Message-ID: <4bc3ea$7ld@bcrkh13.bnr.ca>
References: <4ab85f$idq@news.voicenet.com> <DJBt1u.GFD@tigger.jvnc.net> <4akmsb$qa3@shellx.best.com> <4al3miINNmqt@gambier.ugrad.cs.ubc.ca> <4andei$hmc@bcrkh13.bnr.ca> <4b7ds9$6bu@uriah.heep.sax.de>
NNTP-Posting-Host: nbrwh101.bnr.ca
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 1.1N (X11; I; HP-UX B.10.00 9000/819)
X-URL: news://47.8.2.174/4b7ds9$6bu@uriah.heep.sax.de
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:10995 comp.unix.advocacy:12469

j@uriah.heep.sax.de (J Wunsch) wrote:
>Will Packard <will@nt.com> writes:
>
>> The lack of overhead associated with a thread is the reason to use threads
>> instead of separate processes.
>
>I don't think so.  I rather think it's the ability of using a shared
>data region between all threads, so for the typical example of
>windowing systems, you could continue to draw an image in one thread
>while already waiting for new events in the other one.  This is rather
>hard to accomplish with distinct processes (but not impossible, e.g.
>by extended usage of shared memory between the processes).
>

Yes, this is true. I had a specific application in mind, where I had 
considered threading to avoid any performance hit associated with context
switches. Sharing address space without using IPC shared memory is probably 
what most people want threading for.

>-- 
>cheers, J"org
>
>joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
>Never trust an operating system you don't have sources for. ;-)
>

-- 
Will