From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,2aedba6752dd2388 X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-10-14 09:10:02 PST Newsgroups: comp.unix.osf.misc Path: gmd.de!xlink.net!howland.reston.ans.net!usenet.ins.cwru.edu!uuspew.uu.net!uunet!decwrl!pa.dec.com!uvo.dec.com!rixrax.fno.dec.com!jpt From: jpt@rixrax.fno.dec.com (Jari Tavi) Subject: Re: Threads better than forks? Message-ID: <1993Oct14.153715.10700@decuk.uvo.dec.com> Sender: usenet@decuk.uvo.dec.com (USENET News System) Reply-To: jpt@rixrax.fno.dec.com (Jari Tavi) Organization: Digital Equipment Corporation X-Newsreader: mxrn 6.18-6 References: <1993Oct11.170510.13690@mnemosyne.cs.du.edu> <29ej1h$n33@hpuerca.atl.hp.com> Date: Thu, 14 Oct 1993 15:37:15 GMT >Another difference between threads (tasks) and processes that I'm not quite >sure about has to do with scheduling. As I understand it, all a process's >tasks share that one process's timeslice. On the other hand, forked >process's each get a timeslice of their own. > > If this is true, than a function devided into 5 processes might execute >faster than the same function divided into 5 threads within one process, >since the 5 process solution would get five times the cpu time. This is not true. In OSF/1 and other thread oriented OS's thread is minimum unit of execution - each thread can be scheduled individually and can execute parallel in different processor. So in fact thread based solution can reach much higher level of parallelism as it can use both processes and threads to increase the level of concurrent execution. There are different implementations in other operating systems than OSF/1 though. Some of them may not be real multi threaded. -jari -- ------------------------------------------------------------------------------- Full-Name: Jari Tavi Organization: DEC Finland Dept: DS/OSG Tel: +358-0-434 5252 Fax: +358-0-452 1392 E-mail: jpt@rixrax.enet.dec.com Address: Digital Equipment Corporation Oy PL 16 02201 Espoo FINLAND ------------------------------------------------------------------------------- * All opinions are my personal, and do not necessarily represent opinions of * my employer!