[lkml]   [2001]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: threading question
    On Tue, Jun 12, 2001 at 01:07:11PM -0600, wrote:
    > due to the nature of the problem (a pairwise mutual alignment of n
    > sequences results in mx. n^2 alignments which can each be done in a
    > separate thread), I need to create and destroy the threads frequently.
    > I am not really comfortable with 1.4 - 1.5 speedups since the solution was
    > intended as a Linux one primarily and it just happenned that it works (and
    > now even better) on Solaris/SGI/OSF...

    Nor would I.

    What I do in my numerics code to avoid this problem, is to create all the
    threads (as many as there are CPUs) on program startup and have then wait
    (block) for a condition. As soon as there's something to to, variables for
    the thread are setup (protected by a mutex) and the thread gets signalled
    If you're interested in the code, tell me.

    This is supposed to be much faster than thread creation.

    Kurt Garloff <> Eindhoven, NL
    GPG key: See mail header, key servers Linux kernel development
    SuSE GmbH, Nuernberg, FRG SCSI, Security
    [unhandled content-type:application/pgp-signature]
     \ /
      Last update: 2005-03-22 12:55    [W:0.022 / U:43.188 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site