comp.lang.ada
 help / color / mirror / Atom feed
From: ratsonjaniv@hotmail.com (Mr. J.)
Subject: Re: A common array
Date: 19 Dec 2003 07:13:12 -0800
Date: 2003-12-19T07:13:12-08:00	[thread overview]
Message-ID: <fc116fae.0312190713.7182a4d6@posting.google.com> (raw)
In-Reply-To: RvidnZMSjN8Hh3yiRVn-sQ@gbronline.com

Thanks.
Well, U ask me to be more specific.
I'll do that.

I need to write a procedure that checks and prints  the prime numbers
between 1 and m.
The procedure gets 2 parameter, m- the numbers to check 1..m and n -
the number of tasks to perform it.

each tak will check if a number is a prime number, and will update an
array of booleans (size 1..m).
At the end of all tasks the procedure prints the prime numbers.

A managment task should manage all the tasks allocations ...

Regards,
Janiv Ratson.




Wes Groleau <groleau@freeshell.org> wrote in message news:<RvidnZMSjN8Hh3yiRVn-sQ@gbronline.com>...
> Stephen Leake wrote:
> >>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 ? 
> > 
> > Put that common array in yet another task, or in a protected object.
> 
> Or, make each 'cell' a protected object.  But, since each
> cell has it's own task updating it, maybe the protection
> is not needed?  (As Stephen said, you haven't given enough
> information.)



  reply	other threads:[~2003-12-19 15:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-17 22:08 A common array Ratson Janiv
2003-12-18  2:25 ` Stephen Leake
2003-12-18  3:10   ` Wes Groleau
2003-12-19 15:13     ` Mr. J. [this message]
2003-12-20  3:23       ` Wes Groleau
2003-12-19 15:10 ` Ratson Janiv
2003-12-20  9:24 ` Ratson Janiv
2003-12-20 18:06   ` Robert I. Eachus
2003-12-20 18:56 ` @Fill(NOSPAM)YourBrain.com
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox