All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: "Povolotsky, Alexander" <Alexander.Povolotsky@marconi.com>
Cc: "'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"'rml@tech9.net'" <rml@tech9.net>,
	"'akpm@osdl.org'" <akpm@osdl.org>,
	"'Con Kolivas'" <kernel@kolivas.org>,
	"'Kevin P. Dankwardt'" <k@kcomputing.com>,
	"'Oliver Neukum'" <oliver@neukum.org>,
	"'Felipe Alfaro Solana'" <felipe_alfaro@linuxmail.org>,
	"'Tigran Aivazian'" <tigran@veritas.com>,
	"'corbet@lwn.net'" <corbet@lwn.net>
Subject: Re: Linux scheduler (scheduling) questions vs threads
Date: Thu, 1 Jul 2004 14:06:24 +0200	[thread overview]
Message-ID: <20040701120624.GA24295@elte.hu> (raw)
In-Reply-To: <313680C9A886D511A06000204840E1CF08F42FBC@whq-msgusr-02.pit.comms.marconi.com>


* Povolotsky, Alexander <Alexander.Povolotsky@marconi.com> wrote:

> Sorry for bothering and annoying everyone on this list again with additional
> questions ...
> 
> Let assume there is one (and only one) application (user space ) process
> running on the Linux 2.6 - with multiple threads within it, created via
> "clone" (this happens, I presume, for example, if one uses Monta Vista
> library for porting PSOS to Linux).
> 
> What scheduling policies those threads (within the same process) will be
> governed by (if any )?

in Linux there's no difference between the scheduling of 'threads' and
'processes'. Both are internally a 'task'. If two tasks share the same
MM (this is possible via the use of clone()) then they are called
threads. If a task has its own MM (normally created via fork()) then
it's called a process - but the scheduler doesnt care.

so the normal Linux scheduling policy applies to 'threads' too. Fully
preemptable, SCHED_NORMAL by default, or SCHED_FIFO/SCHED_RR if you set
it. The priority (or rt_priority) can be set per-task as well. Newly
created threads/processes may inherit (or not) the policy of the parent,
this largely depends on the library implementation.

	Ingo

  reply	other threads:[~2004-07-01 12:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-01 11:56 Linux scheduler (scheduling) questions vs threads Povolotsky, Alexander
2004-07-01 12:06 ` Ingo Molnar [this message]
2004-07-01 21:41   ` Bill Davidsen
     [not found] <04Jul1.223441edt.41896@gpu.utcc.utoronto.ca>
2004-07-03 13:57 ` Bill Davidsen
2004-07-03 15:18   ` Paul Rolland

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=20040701120624.GA24295@elte.hu \
    --to=mingo@elte.hu \
    --cc=Alexander.Povolotsky@marconi.com \
    --cc=akpm@osdl.org \
    --cc=corbet@lwn.net \
    --cc=felipe_alfaro@linuxmail.org \
    --cc=k@kcomputing.com \
    --cc=kernel@kolivas.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=rml@tech9.net \
    --cc=tigran@veritas.com \
    /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.