From: Hubert <herrdoktor@fumanchu.com>
Subject: Re: How to: communication between multiple tasks using protected objects - with no polling?
Date: Wed, 21 Jan 2015 15:22:49 -0800
Date: 2015-01-21T15:22:49-08:00 [thread overview]
Message-ID: <8xWvw.618732$ZT5.570497@fx07.iad> (raw)
In-Reply-To: <e4dd31bd-1248-4aac-88ad-748cd0c3e94d@googlegroups.com>
the point of a protected object here is that the code each task spends
in it should be small, just enough to add an entry to a list or so.
When you send a message to a task, it can be that the task is involved
in a lengthy operatin and thus your task has to wait until the received
task can accept it.
You could also make a more complex setup, perhaps something like
Tx1 -> Pox1 -> Tx2 -> Po-final ->Tfinal
Ty2 -> Poy2 -> Ty2 ^
and then Have one output PO per worker task and each has it's own task
to forward the data to the final PO from which the final task fetches it
or so.
The Ada tasking system is easy enough to use to set up stuff like this
pretty quickly and when tasks sleep waiting for an entry they dont eat time.
Just you have to be careful about the maximimum NOF tasks your system
can support which is, I believe, depended on the underlying OS. But in
my experience a few dozen are not problem, pehraps even a few 100,
depending on how much stack each underlying thread reserves. But I
wasn't able to get any hard data on that.
---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com
next prev parent reply other threads:[~2015-01-21 23:22 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-20 22:36 How to: communication between multiple tasks using protected objects - with no polling? Esa Riihonen
2015-01-21 0:19 ` Hubert
2015-01-21 16:53 ` Esa Riihonen
2015-01-21 23:22 ` Hubert [this message]
2015-01-22 13:24 ` Esa Riihonen
2015-01-21 0:47 ` Jeffrey Carter
2015-01-21 8:11 ` Simon Wright
2015-01-21 17:16 ` Esa Riihonen
2015-01-21 18:39 ` Jeffrey Carter
2015-01-22 13:32 ` Esa Riihonen
2015-01-21 8:28 ` Dmitry A. Kazakov
2015-01-21 17:34 ` Esa Riihonen
2015-01-21 18:56 ` Jacob Sparre Andersen
2015-01-21 20:15 ` Dmitry A. Kazakov
2015-01-22 21:52 ` G.B.
2015-01-23 8:25 ` Dmitry A. Kazakov
2015-01-21 20:02 ` Dmitry A. Kazakov
2015-01-22 13:37 ` Esa Riihonen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox