*BSD News Article 57277


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.rmit.EDU.AU!news.unimelb.EDU.AU!munnari.OZ.AU!spool.mu.edu!caen!reeve.research.aa.wl.com!decwrl!purdue!news.bu.edu!usenet
From: Mikhail Teterin <mi@ALDAN.star89.galstar.com>
Newsgroups: comp.unix.bsd.freebsd.misc,comp.unix.advocacy
Subject: Re: Win32 CreateThread() vs Unix fork()
Date: Sat, 09 Dec 1995 12:24:27 -0500
Organization: Zion Elders of SCS
Lines: 32
Message-ID: <30C9C64B.794BDF32@ALDAN.star89.galstar.com>
References: <4ab85f$idq@news.voicenet.com> <4ac483$9nn@nike.volvo.se>
NNTP-Posting-Host: ppp-71-29.bu.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0b3 (X11; I; FreeBSD 2.1.0-950928-SNA0 i386)
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:10787 comp.unix.advocacy:12371

peter hakanson wrote:
> : Win32's CreateThread() is an extremely fast and efficient way of
> : implementing multi-threaded, multi-user server applications (like Web
> : servers). Threads are then run on individual processors in SMP boards,
> : further boosting throughput.
> 

So far, in my experience, the suppousedly BEST Windows NT machines in the
world -- MicroSoft's own Web and FTP servers hang every so often. I tried
to download NT "Service Packs" (read bug-fixes)...

> : By contrast, Unix uses fork() to start an entire new process to
> : service client requests. MP unixes could then run these whole
> : processes on different CPU's.
> 

Using threads might be a good idea, but so far never implemented properly
AFAIK. It makes OS so complicated, that new arising bugs eat all the bene-
fits you were suppoused to get. None of the NT tools (those which come with
OS) use threading. Not even a FileManager -- when you copy files from one
drive to another, you can not do anything else. You can not even minimize
the damn thing.

The difference between fork and CreateThread (or whatever) is, that DATA
of the parent is not recreated for a child (brother?). Even in bug free OS
(just imagine (: ), you still need to worry about synchronization. I think
that there is far less places, where you can benefit from threading, then
it seems from the first look.

And I do not see, why bother with that on a single CPU machine at all...

	-mi