From: Michael Erdmann <michael.erdmann@snafu.de>
Subject: Re: Q: Binding tasks to CPU's seems not to work with Task_Info pragma?!
Date: 13 Aug 2013 04:29:29 GMT
Date: 2013-08-13T06:29:29+02:00 [thread overview]
Message-ID: <5209b629$0$92294$afc38c87@news6.united-newsserver.de> (raw)
In-Reply-To: kubgti$lei$1@loke.gir.dk
On Mon, 12 Aug 2013 15:34:58 -0500, Randy Brukardt wrote:
> Why are you using that rather than the Ada 2012 pragma (or better yet,
> aspect) CPU?
I did not now it; GPS does not show this Pargma; anyway the following
construct
task type Task_Type( id : Natural ) with CPU => CPU_Range(Id) ;
type Task_Access is access all Task_Type;
task body Task_Type is
begin
while true loop
null;
end loop;
Put_Line("Terminated");
end;
yields constant the utilization below:
Cpu0 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu1 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu2 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu3 :100.0%us, 0.0%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu4 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu5 : 0.0%us, 0.0%sy, 0.0%ni,100.0%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Cpu6 : 0.0%us, 0.0%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.3%st
Cpu7 : 0.0%us, 0.3%sy, 0.0%ni, 99.7%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 3981796k total, 738592k used, 3243204k free, 860k buffers
Thanxs
/Michael
>
> task type Task_Type (Id : Ada.Multiprocessors.CPU) is
> pragma Priority(4);
> pragma CPU(Id);
> end Task_Type;
>
> or better still:
>
> task type Task_Type (Id : Ada.Multiprocessors.CPU)
> with Priority => 4, CPU => Id is
> end Task_Type;
>
> Randy.
>
> "Michael Erdmann" <michael.erdmann@snafu.de> wrote in message
> news:520699bb$0$2256$afc38c87@news6.united-newsserver.de...
>> On Sat, 10 Aug 2013 12:17:03 -0700, AdaMagica wrote:
>>
>>> Pragma Task_Info is not standard Ada. Must be GNAT specific.
>>
>> Yes; it is GNAT specific:
>>
>> http://gcc.gnu.org/onlinedocs/gnat_rm/Pragma-Task_005fInfo.html
>>
>>
>> /Michael
>>
next prev parent reply other threads:[~2013-08-13 4:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-10 17:56 Q: Binding tasks to CPU's seems not to work with Task_Info pragma?! Michael Erdmann
2013-08-10 19:17 ` AdaMagica
2013-08-10 19:51 ` Michael Erdmann
2013-08-12 20:34 ` Randy Brukardt
2013-08-12 21:49 ` Simon Wright
2013-08-13 4:29 ` Michael Erdmann [this message]
2013-08-13 5:15 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox