A common array

From: Ratson Janiv (janiv_at_013.net.il)
Date: 12/17/03


Date: Thu, 18 Dec 2003 00:08:23 +0200

Hi,
I need to write a program that creates a random number of tasks.
I need the tasks to update a common array (1 array for all the tasks).
do I need keep the array updating in critical section (I know that each task
will update a differnet cell in the array), if so how ?
Also I need to write a mechanism that enables the task to perform the check
twice with two differnet parameters, e.g. I call Task X to check Numer 4 in
the array, and after it finishes, I want it to notify me, and also I want
teh task X to check the 18 Number.

for the decency, I M studying Ada, and it is part of my work, so please try
to help me as much as U can without writing the answers to me, I think some
guide lines will be helpful.

Many Many thanks,
Janiv Ratson.



Relevant Pages

  • Re: A common array
    ... often Ada has a totally different approach than you are used to. ... do I need keep the array updating in critical section (I ... > know that each task will update a differnet cell in the array), ... Then do the check, then loop back. ...
    (comp.lang.ada)
  • Re: A common array
    ... > I need the tasks to update a common array. ... > do I need keep the array updating in critical section (I know that each ... > will update a differnet cell in the array), ... > Janiv Ratson. ...
    (comp.lang.ada)
  • Re: A common array
    ... Ratson Janiv wrote: ... > I need the tasks to update a common array. ... > for the decency, I M studying Ada, and it is part of my work, so please try ... protected type. ...
    (comp.lang.ada)
  • Re: A common array
    ... Stephen Leake wrote: ... >>I need the tasks to update a common array (1 array for all the ... do I need keep the array updating in critical section (I ... > Put that common array in yet another task, ...
    (comp.lang.ada)
  • Re: Locking memory and multiple timers?
    ... handlers manipulate a common array of data. ... I'm getting Null refererance errors - should I put a lock on the array when ... In general though, yes - you need to obtain a lock (on something, see ...
    (microsoft.public.dotnet.languages.csharp)