lkml.org 
[lkml]   [2004]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectMaximum frequency of re-scheduling (minimum time quantum) questio n
Date
Hello,

In Linux 2.6 kernel, configured with SCHED_RR, - could rescheduling be set
to be attempted (and executed when appropriate) at EVERY CLOCK TICK, thus
allowing the "other" process/thread (if available and ready at the moment)
with the higher (highest at that time) priority or, otherwise, with the same
priority (the "next" process/thread in the same Round Robin queue, from
which the "current" process/thread was "picked" ) to preempt the "current"
process/thread ?

If EVERY CLOCK TICK is not conceptually possible (please note, that I am not
claiming that frequent rescheduling is "good", I am just asking to what
measure it is possible ...) - then what is the minimum "rescheduling" time
quantum (measured in clock ticks) is settable/possible ?

What is the default value (which I presume was chosen as "optimal" ?) ?

Thanks,
Best Regards,
Alex Povolotsky
-----Original Message-----
From: Ingo Molnar [mailto:mingo@elte.hu]
Sent: Thursday, July 01, 2004 8:06 AM
To: Povolotsky, Alexander
Cc: 'linux-kernel@vger.kernel.org'; 'rml@tech9.net'; 'akpm@osdl.org';
'Con Kolivas'; 'Kevin P. Dankwardt'; 'Oliver Neukum'; 'Felipe Alfaro
Solana'; 'Tigran Aivazian'; 'corbet@lwn.net'
Subject: Re: Linux scheduler (scheduling) questions vs threads



* 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 doesn't 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.025 / U:1.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site