Re: Fastcode memory managers

From: Thorsten Engler [NexusDB] (thorsten.englerNO_at_SPAMnexusdb.com)
Date: 11/15/04


Date: Tue, 16 Nov 2004 02:37:10 +1000


> Ok, thanks.
> So it "works" by preventing the lower priority thread from getting
> CPU cycles and leaving it in stasis?
The lower priority thread owns the lock and the higher priority thread keeps
spinning around, preventing the lower priority thread from leaving the lock.
This is a "live lock" (opposed to a "dead lock") as the CPU utilization is
100%.

You don't really need a "real-time" priority thread to see it, even a
combination of multiple threads that are only 1 step away from each other
(e.g. lower/normal or normal/higher) is enough to trigger this problem when
the conditions are right. The OS (at least on NT based systems) will
recognize this situation after a few seconds boost the lower priority thread
to just under real-time priority for one time slice. So you won't see a
total lockup, instead just a freeze for a few seconds which the CPU at 100%
before the OS notices the problem. But under the right conditions that can
happen every few minutes or even seconds.

Cheers,
Thorsten Engler [NexusMM Architect]



Relevant Pages

  • Re: Sun Blade 1500 running Solaris 10 11/06 is choking in ufs code
    ... First of all another thread holds that lock and for second it ... isn't a crashdump because it the system is spinning around a mutex so it ... One high priority thread is interrupting a lower priority thread. ...
    (comp.unix.solaris)
  • Re: CriticalSection & Priority Inversion problem
    ... This means that when a high priority thread blocks on an object held by a ... threads blocks on something else while it has the lock on the CS. ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: Question on scalability of multi-core Processors
    ... what about just having the OS "unimplemented" trap handler mark ... My intuition says that forcing a high priority thread ... off a slow cpu so it can run on a fast cpu is unnecessary. ... was beat to death on the kernel lists when the cpu throttle ...
    (comp.arch)
  • Re: Question on scalability of multi-core Processors
    ... the thread as needing to be launched on a core that includes that functionality? ... This is implemented by each processor scheduler scanning ... My intuition says that forcing a high priority thread ... off a slow cpu so it can run on a fast cpu is unnecessary. ...
    (comp.arch)
  • Re: Kernel Timeslice
    ... As I recall, the tick rate only matters when the threads are, as Patrick ... can use the CPU flat out before a new scheduling decision is made. ... Separate user interaction into a high priority thread pool, ...
    (Fedora)