Hi Jan,

On 8/25/07, Jan Ciger <[EMAIL PROTECTED]> wrote:
> Yes, that has me puzzled too, but you have to keep in mind that Linux
> threading is implemented in separate processes. There isn't much
> difference between a process and a thread on Linux. Even on a single
> core machine one thread holding a lock could be scheduled away from the
> CPU while another one is executed. On a multicore machine this only
> happens sooner.

Its not quite the same w.r.t single core and multi-core, on a single
core machine each thread/process gets a scheduled block on time CPU
and during this period nothing else runs, nothing else can read and
write to memory.  In a multi-core system things properly happen in
parallel - so contention over reading and writing of memory become a
much greater issue, this is why its not uncommon to find
multi-threaded code that runs "robustly" on a single core breaks once
you throw more cores at it.

> If the multicore system is fast enough to run through the critical
> section causing the deadlock before the other thread has a chance to
> acquire the offending lock, you will not see the bug.

I guess there is chance that is happening, but I would expect that
occasionally we'd see hangs on multi-core systems if timing was an
issue.

> OK, let me know if you find something out.

Haven't tested yet...

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to