[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: pthreads undren



On Thu, 6 Jan 2000, Simon Lodal wrote:

> Mit program starter. Der er 1 thread; 1 process. Når jeg spawner en
> thread første gang, er der pludselig 3 threads med pid's på række. Jeg
> er godt klar over at threads er processer (med egen pid), men hvorfor
> er der 3?

Det har jeg også opdaget når jeg programmerede med threads. Jeg tror det
har noget at gøre med den thread-emulering, da det er kendt at unix ikke
har native support for threading.
Ud over at det spilder lidt af systemressourcerne kan jeg ikke se noget
dårligt ved det ekstra thread der.

> Og så til det helt generelle: Jeg har stadig mulighed for lave
> kode-designet om til at bruge processer i stedet for threads, lidt
> mere UNIX-tro.

Det kan jeg også anbefale og det var også mit løsning, som jeg valgte for
at undgå den lidt kiksede thread-emulering.

-- 
=================+======================================+================
 Valery Kotchiev | Computer Science / Chemistry student | sslug@sslug
-----------------+--------------+-----------------------+----------------
http://rudiment.ehp.dk/~incore/ | finger://sslug@sslug for PGP
=========================================================================

To the systems programmer, users and applications serve only to provide a
test load.



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *