public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakob Oestergaard <jakob@unthought.net>
To: Marco Colombo <marco@esi.it>
Cc: Roberto Fichera <kernel@tekno-soft.it>,
	Ingo Oeser <ingo.oeser@informatik.tu-chemnitz.de>,
	David Schwartz <davids@webmaster.com>,
	linux-kernel@vger.kernel.org
Subject: Re: Developing multi-threading applications
Date: Mon, 17 Jun 2002 20:55:33 +0200	[thread overview]
Message-ID: <20020617185532.GC7974@unthought.net> (raw)
In-Reply-To: <Pine.LNX.4.44.0206171755340.1449-100000@Megathlon.ESI>

On Mon, Jun 17, 2002 at 06:07:51PM +0200, Marco Colombo wrote:
> On Mon, 17 Jun 2002, Roberto Fichera wrote:
> 
> [...]
> > process to a CPU. But I continue to not hunderstand why
> > I must have only one thread per CPU. There is some URL
> > where can I see some kernel/sched/vm/I-O/other-think graph about
> > this point ?
> 
> To put it simply, because you have only one PC per CPU. It's not
> really an OS thing.
> 
> Every time you're saving the PC (and SP, and all the "thread context")
> you're "emulating" more CPUs on just one. And what you got is just...
> an emulation. A Thread is an execution abstraction, and a CPU is an
> execution actor. Sounds sensible to match the two. Use functions instead
> to group instructions by their (functional) meaning.

It is common to use many threads per processor on some operating
systems. But this is (in my experience) because of the lack of proper
non-blocking APIs on said OS.

You can emulate non-blocking APIs with threads and a blocking API. And
on some systems you simply have to.

On GNU/Linux this is not generally a problem.  And as Marco said, you
really shouldn't have to do that.

-- 
................................................................
:   jakob@unthought.net   : And I see the elder races,         :
:.........................: putrid forms of man                :
:   Jakob Østergaard      : See him rise and claim the earth,  :
:        OZ9ABN           : his downfall is at hand.           :
:.........................:............{Konkhra}...............:

  parent reply	other threads:[~2002-06-17 18:55 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
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 [this message]
     [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=20020617185532.GC7974@unthought.net \
    --to=jakob@unthought.net \
    --cc=davids@webmaster.com \
    --cc=ingo.oeser@informatik.tu-chemnitz.de \
    --cc=kernel@tekno-soft.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco@esi.it \
    /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