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!news.ecn.uoknor.edu!news.eng.convex.com!newshost.convex.com!bcm.tmc.edu!news.msfc.nasa.gov!newsfeed.internetmci.com!swrinde!sdd.hp.com!news1.best.com!shellx.best.com!shellx.best.com!not-for-mail From: paigen@shellx.best.com (David Paigen) Newsgroups: comp.unix.bsd.freebsd.misc,comp.unix.advocacy Subject: Re: Win32 CreateThread() vs Unix fork() Date: 12 Dec 1995 11:58:03 -0800 Organization: Forte Computer Systems, Brisbane CA Lines: 32 Message-ID: <4akmsb$qa3@shellx.best.com> References: <4ab85f$idq@news.voicenet.com> <DJBt1u.GFD@tigger.jvnc.net> NNTP-Posting-Host: shellx.best.com X-Newsreader: NN version 6.5.0 #6 (NOV) Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:10306 comp.unix.advocacy:12104 jlucas@uvi.edu (John Lucas) writes: >Threads are just another name for "lighweight process"; you often need >"heavyweight processes" too. :-} LWP first came to the commercial unix world, AFAIK, via SunOS circa '90. It was one of those things where a customer wanted them so Sun supplied. Threads (i.e. LWP) had been in VMS for awhile, I don't know about other commercial OSs. The funny thing is that although LWP VMS were indeed lightweight (say, 2 lbs. vs. 3 kg.), threads under unix were not, really (3g. vs. 4g.). Unix process creation is fast, and context switching on unix style hardware is even better. LWPs were invented for OSs that were dogs, IMHO. There are two downsides to unix threads: 1. It is hard to implement and test threads in an OS. Often they have a very small user base so bugs can go undiscovered for a long time. 2. Writing thread safe code is hard and takes practice. You should figure on twice the coding time and three times the testing time to make sure that your program will not bomb or worse. You should also make sure that the programmers involved have written re-enterent code before. -David Paigen -- David Paigen paigen@{best.com,forte.org} Will answer stupid user aka Sir Henry Lee C, unix, X, news, and questions for beer. Queen's Champion distributed systems (good beer)