Only one at a time

What is the preferred way of ensuring that a process is only started once?

I think that a good solution would be to do the following:

Have the process do a qnx_name_attach.
But before doing this, do a qnx_name_locate to see if a copy of the process
is already running, and exit if so.

Any comments, or better ideas would be appreciated.

Thanks,
Ian Todd.

You have a race condition in what you suggest.

Just do a qnx_name_attach() and watch for the appropriate
error message.

Jay

Ian Todd wrote in message <9scn4s$j3s$1@inn.qnx.com>…

What is the preferred way of ensuring that a process is only started once?

I think that a good solution would be to do the following:

Have the process do a qnx_name_attach.
But before doing this, do a qnx_name_locate to see if a copy of the process
is already running, and exit if so.

Any comments, or better ideas would be appreciated.

Thanks,
Ian Todd.

Jay Hogg <Jay.Hogg@t-netix.com.r-e-m-o-v-e> wrote:

You have a race condition in what you suggest.

Just do a qnx_name_attach() and watch for the appropriate
error message.

This will, of course, work in the local case. In the network
case, it still won’t assure network uniqueness, as there are
network propagation delays for names.

Ensuring uniqueness of a service accross a network is a non-trivial
problem.

-David

QNX Training Services
I do not answer technical questions by email.

About how long would it take for a name to propogate through
a network of 10 nodes (QNX Fleet), on a 10Mb ethernet?

Thanks for the info guys,
Ian.


“David Gibbs” <dagibbs@qnx.com> wrote in message
news:9seslm$eva$1@nntp.qnx.com

Jay Hogg <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote:
You have a race condition in what you suggest.

Just do a qnx_name_attach() and watch for the appropriate
error message.

This will, of course, work in the local case. In the network
case, it still won’t assure network uniqueness, as there are
network propagation delays for names.

Ensuring uniqueness of a service accross a network is a non-trivial
problem.

-David

QNX Training Services
I do not answer technical questions by email.

Ian Todd <iantodd@sympatico.ca> wrote:

About how long would it take for a name to propogate through
a network of 10 nodes (QNX Fleet), on a 10Mb ethernet?

Worse problem than delay is that you can attach the same network
name (i.e. name starting with /) on two nodes at once. You will not
pass any error and each qnx_name_locate on the name will cause lost of
one vid (what leads to system crash). This is my experience.

So if you would like to run one program in network, and if you have
a central node in the network, instead network name it is better
to attach normal name on the central node. This works fine.

Andy

Thanks for the info guys,
Ian.



“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:9seslm$eva$> 1@nntp.qnx.com> …
Jay Hogg <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote:
You have a race condition in what you suggest.

Just do a qnx_name_attach() and watch for the appropriate
error message.

This will, of course, work in the local case. In the network
case, it still won’t assure network uniqueness, as there are
network propagation delays for names.

Ensuring uniqueness of a service accross a network is a non-trivial
problem.

-David

QNX Training Services
I do not answer technical questions by email.

Sorry, bad english…
My question for Andy is: How many “nameloc” running on your network ?
<andy@microstep-mis.com> wrote:
news:9soetv$lhp$2@charon.microstep-mis.sk

Ian Todd <> iantodd@sympatico.ca> > wrote:
About how long would it take for a name to propogate through
a network of 10 nodes (QNX Fleet), on a 10Mb ethernet?

Worse problem than delay is that you can attach the same network
name (i.e. name starting with /) on two nodes at once. You will not
pass any error and each qnx_name_locate on the name will cause lost of
one vid (what leads to system crash). This is my experience.

So if you would like to run one program in network, and if you have
a central node in the network, instead network name it is better
to attach normal name on the central node. This works fine.

Andy

Thanks for the info guys,
Ian.


“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:9seslm$eva$> 1@nntp.qnx.com> …
Jay Hogg <> Jay.Hogg@t-netix.com.r-e-m-o-v-e> > wrote:
You have a race condition in what you suggest.

Just do a qnx_name_attach() and watch for the appropriate
error message.

This will, of course, work in the local case. In the network
case, it still won’t assure network uniqueness, as there are
network propagation delays for names.

Ensuring uniqueness of a service accross a network is a non-trivial
problem.

-David

QNX Training Services
I do not answer technical questions by email.

Shr <shr_a@mail.ru> wrote:

Sorry, bad english…
My question for Andy is: How many “nameloc” running on your network ?

On each node it is launched once (i.e. sin -P nameloc shows two running
nameloc, since it is forked). Use “licinfo -a” to check licenses,
check /etc/netmap whether there are all physicall addressed of all nodes
in whole network on each machine, …

Andy

<andy@microstep-mis.com> wrote in message
news:9srgv5$nf3$1@charon.microstep-mis.sk

Shr <> shr_a@mail.ru> > wrote:
Sorry, bad english…
My question for Andy is: How many “nameloc” running on your network ?

On each node it is launched once (i.e. sin -P nameloc shows two running
nameloc, since it is forked). Use “licinfo -a” to check licenses,
check /etc/netmap whether there are all physicall addressed of all nodes
in whole network on each machine, …

And how many nodes you have? If you have more then 10, you have too
many nameloc. The maximum is 10.

Andy

Mario Charest <mcharest@clipzinformatic.com> wrote:

andy@microstep-mis.com> > wrote in message
news:9srgv5$nf3$> 1@charon.microstep-mis.sk> …
Shr <> shr_a@mail.ru> > wrote:
Sorry, bad english…
My question for Andy is: How many “nameloc” running on your network ?

On each node it is launched once (i.e. sin -P nameloc shows two running
nameloc, since it is forked). Use “licinfo -a” to check licenses,
check /etc/netmap whether there are all physicall addressed of all nodes
in whole network on each machine, …


And how many nodes you have? If you have more then 10, you have too
many nameloc. The maximum is 10.

wau! It’s something new for me. Though I have less than 10 nodes now,
I have experience also with network of more than 10 nodes.
What can more than 10 running nameloc-s cause to QNX network, Mario ?

Shr, please, apologize me for wrong advice.

Andy

Andy

<andy@microstep-mis.com> wrote in message
news:9stbbt$5ot$1@charon.microstep-mis.sk

Mario Charest <> mcharest@clipzinformatic.com> > wrote:

andy@microstep-mis.com> > wrote in message
news:9srgv5$nf3$> 1@charon.microstep-mis.sk> …
Shr <> shr_a@mail.ru> > wrote:
Sorry, bad english…
My question for Andy is: How many “nameloc” running on your network ?

On each node it is launched once (i.e. sin -P nameloc shows two running
nameloc, since it is forked). Use “licinfo -a” to check licenses,
check /etc/netmap whether there are all physicall addressed of all
nodes
in whole network on each machine, …


And how many nodes you have? If you have more then 10, you have too
many nameloc. The maximum is 10.

wau! It’s something new for me. Though I have less than 10 nodes now,
I have experience also with network of more than 10 nodes.
What can more than 10 running nameloc-s cause to QNX network, Mario ?

I’ve experience total chaos :wink: Problem I’ve seen are “sin net” and alive
not being reliable,
license problem, name resolution problem, unexplainable delay in some
network operation.

Note that this was a long time ago, when using 4.24. I’ve stayed away from
having
more then 10 namelocs since then, hence I don’t know how 4.25 would behave
under this condition.



Shr, please, apologize me for wrong advice.

Andy

Andy

!!! Sorry, bad english …
“Mario Charest” <mcharest@clipzinformatic.com> wrote :

I’ve experience total chaos > :wink: > Problem I’ve seen are “sin net” and
alive
not being reliable,
license problem, name resolution problem, >unexplainable delay in some
network operation.

Note that this was a long time ago, when using 4.24. I>'ve stayed away
from
having
more then 10 namelocs since then, hence I don’t know >how 4.25 would
behave
under this condition.

Dear Mario !

My small experience (QNX is very deep) speaks:
There are no unsoluble problems with FLEET( the believers are happy… ).
Mario, when I began to work with QNX, " sin net " ~send~ on “stdout”
(may be on “stderr”!?) that that considered necessary: 2, 3, 4, 5, 6 nodes
in the network (where live 6 nodes).
Now " sin net " in my 6(7, 8,9 ,10) nodes network always sees 6(7,8,9,10)
nodes.
Mario, there are no problems with the licenses in a network at the users.
There are problems at QSSL in the control of the licenses in a network.

Mario, I believe and I want to trust, that QNX4 is COOL!!!

Mario, what you think of the future QNX4?

Dear Mario !
My small experience (QNX is very deep) speaks:
There are no unsoluble problems with FLEET( the believers are happy… ).
Mario, when I began to work with QNX, " sin net " ~send~ on “stdout”
(may be on “stderr”!?) that that considered necessary: 2, 3, 4, 5, 6
nodes
in the network (where live 6 nodes).
Now " sin net " in my 6(7, 8,9 ,10) nodes network always sees 6(7,8,9,10)
nodes.
Mario, there are no problems with the licenses in a network at the users.
There are problems at QSSL in the control of the licenses in a network.

Are you asking for help or just making an observation.

Mario, I believe and I want to trust, that QNX4 is COOL!!!

Mario, what you think of the future QNX4?

QNX made an official statement about this, but I can’t find
the web page anymore, sorry.