Re: Does Ada tasking profit from multi-core cpus?
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Wed, 7 Mar 2007 09:39:43 +0100
On Tue, 6 Mar 2007 19:58:31 -0800, Steve wrote:
"Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx> wrote in message
news:rgcukvs1j6ck$.1vjj69zzy1h56$.dlg@xxxxxxxxxxxxx
On 5 Mar 2007 02:08:22 -0800, Ludovic Brenta wrote:
"Â jpluto" wrote:
Has someone experience with Ada tasking (especially GNAT) on multi-core
systems?
Show programs with several working tasks a performance boost on
dual-core or
quad-core cpus?
On my dual-core Turion 64 with Debian GNU/Linux and GCC 4.1.2, all is
well. Ada programs using tasking use both cores. I think it would work
on most other platforms too, but YMMV.
Apart from using both cores, does anybody know how protected objects
function on multi-cores? Especially:
1. Whether protected object's functions are indeed executed concurrently
when come from the tasks running on different cores?
2. What are the times required to take/release the protected object's spin
lock compared to ones on single core?
3. Can a task switch cores? If yes, what is the overhead of switching?
On Windows, which uses symmetric multiprocessing, I belive two cores works
the same as two CPU's. With two CPU's the two highest priority threads that
are in the ready state run concurrently, so yes a task can switch cores.
Sorry I don't know about the overhead of switching.
I have run tests on a system with 2 CPU's and found that a single task that
does a lot of switching winds up using 50% of the CPU time on both CPU's
(from the task viewer).
Just a side note, the Windows API GetThreadTimes (which the viewer
apparently uses) is corrupted. It counts complete time quants rather than
the performance counter ticks. So, potentially you could observe 1% under
factual 99% CPU load. The bug should appear for threads performing much
synchronization, because they leave the processor before the current quant
expiration.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- Follow-Ups:
- Re: Does Ada tasking profit from multi-core cpus?
- From: Randy Brukardt
- Re: Does Ada tasking profit from multi-core cpus?
- References:
- Does Ada tasking profit from multi-core cpus?
- From: jpluto
- Re: Does Ada tasking profit from multi-core cpus?
- From: Ludovic Brenta
- Re: Does Ada tasking profit from multi-core cpus?
- From: Dmitry A. Kazakov
- Re: Does Ada tasking profit from multi-core cpus?
- From: Steve
- Does Ada tasking profit from multi-core cpus?
- Prev by Date: Re: Does Ada tasking profit from multi-core cpus?
- Next by Date: Re: PAR (Was: Embedded languages based on early Ada)
- Previous by thread: Re: Does Ada tasking profit from multi-core cpus?
- Next by thread: Re: Does Ada tasking profit from multi-core cpus?
- Index(es):
Relevant Pages
|