Thomas,
I guess I wouldn’t put MsgReceives() in separate threads. If I’m going to
put a MsgReceive() in some other thread than the main thread, then I’m going
to put it into a separate process.
My own personal preference when it comes to dealing with threads is to use
them only when I want to do some specific job, and then quit, or make them
block on a mutex or something. I guess I’ve adopted the philosophy that a
binary should have one receive and if it needs to start a thread to handle a
request, then so be it. The context switch time in QNX being so low, I
guess I lean towards creating a separate process if I come to a point where
I should be putting a MsgReceive() in a thread.
So in essence, the channel question comes from the way that I’ve approached
problems in the past, figuring (as sometimes my blinders get in the way)
that most people do this as well (all things considered).
Regards,
Kevin
<thomasf@qnx.com> wrote in message news:aenqmh$iu2$1@nntp.qnx.com…
Kevin Stallard <> kevin@ffflyingrobots.com> > wrote:
[ Comments snipped ]
I don’t like this notion that seems to be permiating that we should
just
use TCP/IP for all our stuff. I really dislikeTCPIP for embedded
systems.
It makes no sense to me to use it after having been spoiled with FLEET
on
QNX 4. I look at the S/R/R interface for QNX6 and I don’t understand
why
somethings where done. (Channels for example) So I guess my point is,
the
beauty of QNX was it making a network of QNX nodes into one virtual CPU.I hate to drive this further off topic, but …
To clarify about channels …
With QNX6 you are now using real threads. While we could have gone
with the QNX4 approach of just wacking a message at a process, that
would have been rather limiting (Only a single message queue per
process, no clear way to define thread involvement with resources
for the purpose of priority inheritance etc). As a result the
communication channel had to be extracted/abstracted from the
process container. (just in the same way that QNX4 conveniently
tied them together to a pid (and nd), because you could only ever
have one).So QNX4 you had:
node, pid, chid == pid so ignore the chid
Under QNX6 you have:
node, pid, chidAn on extensibility …
The QNX6 mechanism makes it possible in the future to have a pool
of threads which can service multiple channels rather than just one,
which in turn cuts down your overall resourcing. Not that we have
such a broadcast/multiple queue receive API in place right now, but
it is conceivable that you could. Under QNX4 it would have been
must more difficult.[More comments snipped]
Thomas
Thomas (toe-mah) Fletcher QNX Software Systems
thomasf@qnx.com > Core OS Technology Group
(613)-591-0931 > http://www.qnx.com/