Re: [patch] SCHED_SOFTRR starve-free linux scheduling policy ...

From: Daniel Phillips (phillips_at_arcor.de)
Date: 08/09/03

  • Next message: Jeff Garzik: "Re: [patch 2.4 1/2] backport 2.6 x86 cpu capabilities"
    To: Davide Libenzi <davidel@xmailserver.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
    Date:	Sat, 9 Aug 2003 15:05:45 +0100
    
    

    Hi Davide,

    On Sunday 13 July 2003 22:51, Davide Libenzi wrote:
    > This should (hopefully) avoid other tasks starvation exploits :
    >
    > http://www.xmailserver.org/linux-patches/softrr.html

       "We will define a new scheduler policy SCHED_SOFTRR that will make the
       target task to run with realtime priority while, at the same time, we will
       enforce a bound for the CPU time the process itself will consume."

    This needs to be a global bound, not per-task, otherwise realtime tasks can
    starve the system, as others have noted.

    But the patch has a much bigger problem: there is no way a SOFTRR task can be
    realtime as long as higher priority non-realtime tasks can preempt it. The
    new dynamic priority adjustment makes it certain that we will regularly see
    normal tasks with priority elevated above so-called realtime tasks. Even
    without dynamic priority adjustment, any higher priority system task can
    unwttingly make a mockery of realtime schedules.

    So this approach will not produce the desired result. To do this properly,
    each realtime task has to have greater priority than any nonrealtime task,
    and obviously, a global bound on realtime CPU share has to be enforced.

    Regards,

    Daniel

    -
    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/


  • Next message: Jeff Garzik: "Re: [patch 2.4 1/2] backport 2.6 x86 cpu capabilities"

    Relevant Pages

    • Re: What level of timesynch error is typical on Win XP?
      ... The ping time to the server is 2 milliseconds from ... NTP is being allowed to choose its own polling ... realtime, running the daemon at high realtime priority greatly reduces ...
      (comp.protocols.time.ntp)
    • Re: sched_ule performance on single CPU
      ... The X11 server seems to run with mildly elevated priority (46, where realtime is> 60 or so); something like an xterm runs with normal/ default priority of 31: ... Note that realtime tasks like iTunes uses up a lot of CPU time compared with normal processes; it's even using more CPU time than the WindowServer has. ...
      (freebsd-stable)
    • Windows ntpd highest priority doesnt require admin access
      ... ntpd on Windows attempts to raise itself to the realtime priority ... high priority class instead. ... special privilege to raise priority to realtime, ... Meinberg's installer adds the needed privilege for us. ...
      (comp.protocols.time.ntp)
    • Re: [patch] SCHED_SOFTRR starve-free linux scheduling policy ...
      ... > target task to run with realtime priority while, at the same time, we will ... >realtime as long as higher priority non-realtime tasks can preempt it. ... >new dynamic priority adjustment makes it certain that we will regularly see ...
      (Linux-Kernel)
    • thread priority below and above 15 in the same process?
      ... showing me the real priority of all threads. ... I have run our application process as RealTime, ... I'm aware that I can set threads to THREAD_PRIORITY_LOWEST to get priority ... The app does data aqusition that cannot be run in a normal priority without ...
      (microsoft.public.win32.programmer.kernel)