Date: Sat, 22 Jul 2000 00:32:57 +0800 From: "Tan Juay Kwang" <jk.tan@pacific.net.sg> To: "Eran Gabber" <eran@research.bell-labs.com> Cc: <freebsd-questions@FreeBSD.ORG> Subject: RE: pthreads on 4.0-STABLE Message-ID: <NEBBLKHLGDECFCNMHPEEEEAMCPAA.jk.tan@pacific.net.sg> In-Reply-To: <Pine.GSO.3.96.1000720151822.10644k-100000@aura.research.bell-labs.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
>
> I found that the standard Pthreads library uses software
> threads, which
> tends to block the entire process (including all other threads) when
> one of the threads blocks. Although the source of the Pthreads library
> shows that other threads should be allowed to run when one of
> them blocks,
> in fact all threads blocks when one of them waits for file I/O.
>
> Try to use the linuxthreads package, which is available in
> FreeBSD 4.0.
> Linuxthreads is an alternate implementation of Pthreads,
> which supports
> true concurrency among threads.
> Linuxthreads employs the rfork() system call to create a new
> light-weight process for each thread. In this way, if one thread
> blocks, others can continue.
>
When I tried it on RedHat 6.2, I found that all my threads appears as
different processes under ps(1), which is due to the implementation of the
linux threads. Then I realized that I can kill off one of them without
taking down the entire process. The killed off thread will appear as
<defunct> under ps(1). I'm rather baffled by this behavior since I've
always thought that you can't 'kill' a thread within a process by another
process, in this case, kill(1).
However, most of the time, killing off 1 thread does take down the entire
process.
> Since linuxthreads is a different implementation of Pthreads with the
> same API, you can just relink your program with it and try again.
> It may solve your concurrent gethostbyname() problem and the
> dependency
> between phtread_create() and open()/read() that you reported.
>
> Eran
>
>
Best regards,
Juay Kwang
[-- Attachment #2 --]
0 *H
010 + 0 *H
*0.0 v.=}%]
u0
*H
0_10 UUS10U
VeriSign, Inc.1705U.Class 1 Public Primary Certification Authority0
980512000000Z
080512235959Z010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated00
*H
0 ZDUz-Ox6
JoTw*h1ApzKHV-BD\B/;'
]6B3nTOJƚj$e~7jJ |0z0 `HB0GU @0>0<`HE0-0++www.verisign.com/repository/RPA0U0 0U0
*H
7;ڔ7 qjm/d8[jI}g-,ݚB>V*3ǾSLýIBc¦]XI<\Ue _Xj<n00]#
OF5}$;0
*H
010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated0
000628000000Z
000827235959Z010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. by Ref.,LIAB.LTD(c)9810UPersona Not Validated1&0$UDigital ID Class 1 - Netscape10UJuay Kwang Tan10 *H
tanjk@i-dns.net00
*H
0 շN^_I_lX xR_!XG])2!cOL9JK W%ҫԦN4ܷ{,MrUmDZqfkH|%g 00 U0 0DU =0;09`HE0*0(+https://www.verisign.com/rpa0 `HB03U,0*0(&$"http://crl.verisign.com/class1.crl0
*H
F0W9yX Dк4@|FPF6lAR^*ͦ6<UY)Oq"7r2NFwzda_2N֊Fj!iQt$L<>0 JHz=S318040010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated#
OF5}$;0 + 0 *H
1 *H
0 *H
1
000721163256Z0# *H
1\bĀE?e0X *H
1K0I0
*H
0*H
0+0
*H
(0+0
*H
0 +710010U
VeriSign, Inc.10UVeriSign Trust Network1F0DU=www.verisign.com/repository/RPA Incorp. By Ref.,LIAB.LTD(c)981H0FU?VeriSign Class 1 CA Individual Subscriber-Persona Not Validated#
OF5}$;0
*H
~>7ARK%3-Yq
m{fvf6BttjٳǎE/Պh3HQ9ɇe_@n1xCʚw[+b9[wLCsɼ
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NEBBLKHLGDECFCNMHPEEEEAMCPAA.jk.tan>
