mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Oeser <ioe-lkml@axxeo.de>
To: "Chad N. Tindel" <chad@tindel.net>
Cc: Chris Friesen <cfriesen@nortel.com>,
	Paulo Marques <pmarques@grupopie.com>,
	Mike Galbraith <EFAULT@gmx.de>,
	akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: Xterm Hangs - Possible scheduler defect?
Date: Fri, 25 Feb 2005 01:51:41 +0100	[thread overview]
Message-ID: <200502250151.41793.ioe-lkml@axxeo.de> (raw)
In-Reply-To: <20050224200802.GA39590@calma.pair.com>

Chad N. Tindel wrote:
> I think what we have are the need for two levels of applications:
>
> 1.  That which wishes to be the highest priority userspace application, and
> wishes to preempt all other userspace applications.  Such an application is
> OK being preempted by the kernel when the kernel needs to do work.  IMHO,
> this should be the default behavior for any SCHED_FIFO application.  If one
> of these has a bug and goes CPU-bound, the worst it can do is prevent other
> apps from ever using the CPU it is on.

That is basically, what you do with SCHED_RR.
(Be preempted after maximum quantum, even if having work to do)

> 2.  Applications which actually want to be the highest priority thing on
> the system, including being higher than the kernel.  These applications are
> OK with the fact that they may cause system hangs and deadlocks, and are
> careful not to shoot themselves in the foot.

This is SCHED_FIFO.
(Strict priority scheduling, allowed to starve anything below)

So just try to use the right scheduler for your application right now, ok?

If your system is busy with top priority task, why should the kernel disturb 
it?

Things will stop anyway, if your high priority task is needing a resource,
which is blocked. Than it becomes unrunnable and other tasks have
chances to continue. Kernel threads are likely to execute then, because they
are likely runnable then. Your task could even migrate, if a lot of kernel 
tasks 
are waiting in one CPU and your task is NOT bound to a specific CPU.

So the system is not brought down, but just busy in a infortunate way.
Stupid applications can starve other applications for a while, but not
forever, because the kernel is still running and deciding.


Regards

Ingo Oeser



  parent reply	other threads:[~2005-02-25  0:58 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20050224075756.GA18639@calma.pair.com>
     [not found] ` <30111.1109237503@www1.gmx.net>
2005-02-24 17:53   ` Chad N. Tindel
2005-02-24 18:19     ` Chris Friesen
2005-02-24 18:38       ` Chad N. Tindel
2005-02-24 19:04         ` Paulo Marques
2005-02-24 19:22           ` Chad N. Tindel
2005-02-24 19:46             ` Chris Friesen
2005-02-24 20:08               ` Chad N. Tindel
2005-02-24 20:29                 ` Chris Friesen
2005-02-25  0:51                 ` Ingo Oeser [this message]
2005-02-25 15:12                   ` Chris Friesen
2005-02-25 15:39                     ` Ingo Oeser
2005-02-25 15:53                       ` Paulo Marques
2005-02-25 16:24                         ` Lee Revell
2005-02-25 17:07                           ` Chris Friesen
2005-02-24 19:52             ` Barry K. Nathan
2005-02-25 20:25             ` Helge Hafting
2005-02-25 21:02               ` Chad N. Tindel
2005-02-25 23:24                 ` Lee Revell
2005-02-26 11:58                 ` Helge Hafting
2005-02-25  4:25     ` Mike Galbraith
2005-02-23 23:06 Chad N. Tindel
2005-02-24  2:36 ` Andrew Morton
2005-02-24  5:23   ` Chad N. Tindel
2005-02-24  6:50     ` Andrew Morton
2005-02-24  5:26   ` Chad N. Tindel
2005-02-24 13:25     ` Helge Hafting
2005-02-24 17:33       ` Chad N. Tindel
2005-02-24 22:25         ` Peter Chubb
2005-02-24 22:40           ` Chad N. Tindel
2005-02-24 23:00         ` Andrew Morton
2005-02-24 23:22           ` Chris Friesen
2005-02-24 23:32             ` Andrew Morton
2005-02-25  0:47           ` Kyle Moffett

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=200502250151.41793.ioe-lkml@axxeo.de \
    --to=ioe-lkml@axxeo.de \
    --cc=EFAULT@gmx.de \
    --cc=akpm@osdl.org \
    --cc=cfriesen@nortel.com \
    --cc=chad@tindel.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmarques@grupopie.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®