All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roberto Fichera <kernel@tekno-soft.it>
To: Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Developing multi-threading applications
Date: Thu, 13 Jun 2002 12:25:12 +0200	[thread overview]
Message-ID: <5.1.1.6.0.20020613115257.03b03ec0@mail.tekno-soft.it> (raw)
In-Reply-To: <20020613113158.I22429@nightmaster.csn.tu-chemnitz.de>

At 11.31 13/06/02 +0200, Ingo Oeser wrote:

>On Thu, Jun 13, 2002 at 11:08:27AM +0200, Roberto Fichera wrote:
> > You are right! But "computational intensive" is not totaly right as I 
> say ;-),
> > because most of thread are waiting for I/O, after I/O are performed the
> > computational intensive tasks, finished its work all the result are sent
> > to thread-father, the father collect all the child's result and perform 
> some
> > computational work and send its result to its father and so on with many
> > thread-father controlling other child. So I think the main problem/overhead
> > is thread creation and the thread's numbers.
>
>So you are creating a simulation/emulation application/engine, right?
>Or a measured data analysis engine? (which is basically the same
>task)

Yes! It's a simulation/emulation application.

>For these kind of tasks creating your own kind of "threads" is
>probably better.
>
>Split it in the following data structure:
>
>struct my_thread {
>    actor_function_t actor;
>    input_t inbuf;
>    output_t outbuf;
>    state_t statebuf;
>}
>
>And provide rules and primitives for accessing inbuf/outbuf, if
>they might be shared (which is probable).

This can be a solution.


>Now you can build a dependency tree/graph for the whole stuff
>easily and schedule works of the same level to some real worker
>threads (which might be on different machines), which are one per CPU.
>
>The problem is to build the actor as a REAL primitive, that
>scales only by the size of inbuf and not by the contents of it.

Yes!

>Everything else is going to be bloated and not really scalable,
>but can be implemented by every "Joe Programmer" after finishing
>high school ;-)

Depending by the threading library, if it's totaly userspace or not!
With so many thread that aren't totaly userspace the scheduler
performances/caratteristics are much important. I prefer a mixed
solution for example. Because some problem can be easily resolved
with a userspace threads and other not.


>Regards
>
>Ingo Oeser
>--
>Science is what we can tell a computer. Art is everything else. --- D.E.Knuth

Roberto Fichera.


       reply	other threads:[~2002-06-13 10:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20020613113158.I22429@nightmaster.csn.tu-chemnitz.de>
2002-06-13 10:25 ` Roberto Fichera [this message]
2002-06-13  8:13 Developing multi-threading applications Roberto Fichera
2002-06-13  8:26 ` David Schwartz
2002-06-13  9:08   ` Roberto Fichera
2002-06-13  9:44     ` Peter Wächtler
2002-06-13  9:52       ` Roberto Fichera
2002-06-13 10:16         ` Peter Wächtler
2002-06-13 10:42           ` Roberto Fichera
2002-06-13 10:13     ` David Schwartz
2002-06-13 11:21       ` Roberto Fichera
2002-06-13 11:58         ` David Schwartz
2002-06-13 16:26           ` Roberto Fichera
2002-06-14 20:56             ` David Schwartz
2002-06-15  9:01               ` Roberto Fichera
2002-06-15 10:30                 ` Ingo Oeser
2002-06-17  8:17                   ` Roberto Fichera
2002-06-17 16:07                     ` Marco Colombo
2002-06-17 18:00                       ` Roberto Fichera
2002-06-17 18:55                       ` Jakob Oestergaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.1.1.6.0.20020613115257.03b03ec0@mail.tekno-soft.it \
    --to=kernel@tekno-soft.it \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.