From: David Schwartz <davids@webmaster.com>
To: <kernel@tekno-soft.it>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: Developing multi-threading applications
Date: Fri, 14 Jun 2002 13:56:00 -0700 [thread overview]
Message-ID: <20020614205601.AAA9369@shell.webmaster.com@whenever> (raw)
In-Reply-To: <5.1.1.6.0.20020613171707.03f09720@mail.tekno-soft.it>
On Thu, 13 Jun 2002 18:26:54 +0200, Roberto Fichera wrote:
>At 04.58 13/06/02 -0700, David Schwartz wrote:
>This is a scheduler problem! All threads waiting for I/O are blocked by
>the scheduler, and this doesn't have any impact for the context switches
>it increase only the waitqueue, using the Ingo's O(1) scheduler, a big piece
>of code, it should make a big difference for example.
You are incorrect. If you have ten threads each waiting for an I/O and all
ten I/Os are ready, then ten context switches are needed. If you have one
thread waiting for ten I/Os, and then I/Os come ready, one context switch is
needed.
[snip]
>I don't think "more threads == more work done"! With the thread's approch
>it's
>possible to split a big sequential program in a variety of concurrent
>logical
>programs with a big win for code revisions and new implementation.
I'm not advising eliminating the threads approach. I'm only advising not
using threads as your abstraction for clients or work to be done. Use threads
as the execution vehicles that pick up work when there's work to be done.
(Think thread pools, think separating I/O from computation.)
[snip]
>You are right! But depend by the application! If you have todo I/O like
>signal acquisition,
>sensors acquisitions and so on, you must have a one thread for each type of
>data acquisition,
Even if that's true, and it's often not, how many different types of data
acquisition can you have? Ten? Twenty? That's a far cry from 300.
DS
next prev parent reply other threads:[~2002-06-14 20:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
[not found] <20020613113158.I22429@nightmaster.csn.tu-chemnitz.de>
2002-06-13 10:25 ` Roberto Fichera
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=20020614205601.AAA9369@shell.webmaster.com@whenever \
--to=davids@webmaster.com \
--cc=kernel@tekno-soft.it \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox