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-12 12:57:38 PST Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!bloom-beacon.mit.edu!paperboy.osf.org!sp From: sp@mogul.osf.org (Simon Patience) Newsgroups: comp.unix.osf.misc Subject: Re: Threads better than forks? Date: 12 Oct 1993 18:53:09 GMT Organization: Open Software Foundation Distribution: world Message-ID: <29euel$t83@paperboy.osf.org> References: <1993Oct11.170510.13690@mnemosyne.cs.du.edu> <29ej1h$n33@hpuerca.atl.hp.com> NNTP-Posting-Host: mogul.osf.org In article <29ej1h$n33@hpuerca.atl.hp.com>, sailer@atl.hp.com (Lee Sailer) writes: |> 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. You are wrong, at least in OSF/1 and Mach. A thread is the schedulable entity and not the task/process. Thus 5 processes would get as much time as 5 threads as they would be scheduled in the same way. There is a small difference in that switching between 2 threads in the same process/task would not have to change address spaces whereas switching between two processes would so 5 threads may get even more time than 5 processes due to lower system overhead. Simon. -- Simon Patience Phone: (617) 621-7376 Open Software Foundation FAX: (617) 621-8696 1 Cambridge Center Email: sp@osf.org Cambridge, MA 02142 uunet!osf!sp