shared mem accross Qnet?, QNX4.25?

Hi…

Say that I have two x86 systems. Then…


\

  1. Can we have access to shared memory objects across physical
    boundaries via qnet or nfs in QNX RTP?

  2. How about in QNX4.25?



    My guess is NOT, but…

Thanks in advance.

Miguel

Miguel Simon <simon@ou.edu> wrote:

  1. Can we have access to shared memory objects across physical
    boundaries via qnet or nfs in QNX RTP?

Nope.

  1. How about in QNX4.25?

Also nope.

You need to use some sort of messaging IPC across machines - qnet, TCP/UDP,
carrier pigeons, etc.

In my very own personal opinion, unless you’ve got performance issues,
it’s better to go with a messaging system rather than use shared memory.
Not just for the above point that it lets you distribute the application
across multiple nodes, but also because it minimizes the point of
interaction between the two pieces.

\

Brian Stecher (bstecher@qnx.com) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M 1W8

“Brian Stecher” <bstecher@qnx.com> wrote in message
news:90lfbr$h7e$1@nntp.qnx.com

Miguel Simon <> simon@ou.edu> > wrote:

  1. Can we have access to shared memory objects across physical
    boundaries via qnet or nfs in QNX RTP?

Nope.

  1. How about in QNX4.25?

There is a program in /usr/free call memdev.tgz I beleive
it maps the whole memory of the system under /dev/mem so
it can be access across the network. I can’t
be use with C/C++ pointer, it must be access with read() write().
There is a program call spatch (from memory) that uses
this device to diplay.edit memory content.

spatch should be trivial to port to QRTP and writting
a resmgr to give access to memory is very simple.

But in the end REAL IPC are better!

Also nope.

You need to use some sort of messaging IPC across machines - qnet,
TCP/UDP,
carrier pigeons, etc.

In my very own personal opinion, unless you’ve got performance issues,
it’s better to go with a messaging system rather than use shared memory.
Not just for the above point that it lets you distribute the application
across multiple nodes, but also because it minimizes the point of
interaction between the two pieces.

\

Brian Stecher (> bstecher@qnx.com> ) QNX Software Systems, Ltd.
phone: +1 (613) 591-0931 (voice) 175 Terence Matthews Cr.
+1 (613) 591-3579 (fax) Kanata, Ontario, Canada K2M
1W8

In theory if you use QNET you should be able to do the same.Qnet being
based on IP

“Miguel Simon” <simon@ou.edu> wrote in message
news:3A2FA9C1.10A03076@ou.edu

Mario, Brian…

Thanks. I appreciate it. I think that I’ll try tcp for now just because
in the end (during deployment) I may have to go across the net to other
subdomains within the school network.

Bests…

Miguel.



Mario Charest wrote:

“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:90lfbr$h7e$> 1@nntp.qnx.com> …
Miguel Simon <> simon@ou.edu> > wrote:

  1. Can we have access to shared memory objects across physical
    boundaries via qnet or nfs in QNX RTP?

Nope.

  1. How about in QNX4.25?

There is a program in /usr/free call memdev.tgz I beleive
it maps the whole memory of the system under /dev/mem so
it can be access across the network. I can’t
be use with C/C++ pointer, it must be access with read() write().
There is a program call spatch (from memory) that uses
this device to diplay.edit memory content.

spatch should be trivial to port to QRTP and writting
a resmgr to give access to memory is very simple.

But in the end REAL IPC are better!

Mario, Brian…

Thanks. I appreciate it. I think that I’ll try tcp for now just because
in the end (during deployment) I may have to go across the net to other
subdomains within the school network.

Bests…

Miguel.



Mario Charest wrote:

“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:90lfbr$h7e$> 1@nntp.qnx.com> …
Miguel Simon <> simon@ou.edu> > wrote:

  1. Can we have access to shared memory objects across physical
    boundaries via qnet or nfs in QNX RTP?

Nope.

  1. How about in QNX4.25?

There is a program in /usr/free call memdev.tgz I beleive
it maps the whole memory of the system under /dev/mem so
it can be access across the network. I can’t
be use with C/C++ pointer, it must be access with read() write().
There is a program call spatch (from memory) that uses
this device to diplay.edit memory content.

spatch should be trivial to port to QRTP and writting
a resmgr to give access to memory is very simple.

But in the end REAL IPC are better!

Yes, it is true, but I need to do all of this programmatically in an
embedded system. Once I deploy the system, the system is out of my
reach for months, and I want to have real-time access to the data
collected! So what I’ll do is to have the data collection program
connect to a server and relay the data.

What I wanted to do originally was to access this out-of-reach-box’s
shared memory from a laptop whenever I visit the site. I wanted to do
this to help me see in real time what is going on via Phab application.

Thanks…

Miguel.


Mario Charest wrote:

In theory if you use QNET you should be able to do the same.Qnet being
based on IP
.
“Miguel Simon” <> simon@ou.edu> > wrote in message
news:> 3A2FA9C1.10A03076@ou.edu> …
Mario, Brian…

Thanks. I appreciate it. I think that I’ll try tcp for now just because
in the end (during deployment) I may have to go across the net to other
subdomains within the school network.

Bests…

Miguel.



Mario Charest wrote:

“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:90lfbr$h7e$> 1@nntp.qnx.com> …
Miguel Simon <> simon@ou.edu> > wrote:

  1. Can we have access to shared memory objects across physical
    boundaries via qnet or nfs in QNX RTP?

Nope.

  1. How about in QNX4.25?

There is a program in /usr/free call memdev.tgz I beleive
it maps the whole memory of the system under /dev/mem so
it can be access across the network. I can’t
be use with C/C++ pointer, it must be access with read() write().
There is a program call spatch (from memory) that uses
this device to diplay.edit memory content.

spatch should be trivial to port to QRTP and writting
a resmgr to give access to memory is very simple.

But in the end REAL IPC are better!

“Miguel Simon” <simon@ou.edu> wrote in message
news:3A2FB097.2BF02C1E@ou.edu

Yes, it is true, but I need to do all of this programmatically in an
embedded system. Once I deploy the system, the system is out of my
reach for months, and I want to have real-time access to the data
collected! So what I’ll do is to have the data collection program
connect to a server and relay the data.

What I wanted to do originally was to access this out-of-reach-box’s
shared memory from a laptop whenever I visit the site. I wanted to do
this to help me see in real time what is going on via Phab application.

I don’t see your point. Why could you do it with TCP/IP and not QNET?
Or did I missunderstood you :wink:

Thanks…

Miguel.


Mario Charest wrote:

In theory if you use QNET you should be able to do the same.Qnet being
based on IP
.
“Miguel Simon” <> simon@ou.edu> > wrote in message
news:> 3A2FA9C1.10A03076@ou.edu> …
Mario, Brian…

Thanks. I appreciate it. I think that I’ll try tcp for now just
because
in the end (during deployment) I may have to go across the net to
other
subdomains within the school network.

Bests…

Miguel.



Mario Charest wrote:

“Brian Stecher” <> bstecher@qnx.com> > wrote in message
news:90lfbr$h7e$> 1@nntp.qnx.com> …
Miguel Simon <> simon@ou.edu> > wrote:

  1. Can we have access to shared memory objects across physical
    boundaries via qnet or nfs in QNX RTP?

Nope.

  1. How about in QNX4.25?

There is a program in /usr/free call memdev.tgz I beleive
it maps the whole memory of the system under /dev/mem so
it can be access across the network. I can’t
be use with C/C++ pointer, it must be access with read() write().
There is a program call spatch (from memory) that uses
this device to diplay.edit memory content.

spatch should be trivial to port to QRTP and writting
a resmgr to give access to memory is very simple.

But in the end REAL IPC are better!

“Miguel Simon” <simon@ou.edu> wrote in message
news:3A2FC338.E5C9B3D9@ou.edu

Now, my understanding is that Qnet is meant to be used to access
data/files manually, but not programmatically. Correct? But if I am
not right, then I want to know! Please! > :slight_smile: > Moreover, if Qnet is
running in a machine in another subdomain, will I still see it from any
other machine connected to the same backbone?

You are wrong. Qnet can most definately be used programatically
(i.e. for IPC).

If Qnet is running on another sub-(net/domain) it will be visible (if
configured
correctly) from other sub-(net/domain)s.

Qnet has an interesting array of QoS options, unavailable in POTCP/IP
(plain old tcp/ip).

btw: I am not trying to be abrupt with my response, only very clear
(since I am under the impression that English may not be your
primary language).

BTW, I use different processes and not threads (and thus shared memory)
because my program legacy on QNX 4.25! :confused: I am in the process of
getting my programs to work under RTP, but my legacy programs will be
there for now. I think that RTP is great, but I do not have time for
now to modify my programs to take full advantage of RTP.

If you need to integrate one machine running QNX 4, and another running
RtP then Qnet is not an option (while TCP/IP of course is).

Rennie

No, you are not incorrect, but I believe that I have not been clear.

The point is as follows. I have several processes (not threads) working
simultaneously, and they utilize shared memory as their IPC. Each of
these processes gets data from a different sensor cluster, and each
process utilizes data from the other sensors to establish some sort of
fault tolerance and so on.

Then, when I come in and want to know the internal state of my processes
(at least under development), I would like to use the same mechanism:
shared memory. I know that there may other and better ways of doing
this, but… this works for me at the moment.

Now, my understanding is that Qnet is meant to be used to access
data/files manually, but not programmatically. Correct? But if I am
not right, then I want to know! Please! :slight_smile: Moreover, if Qnet is
running in a machine in another subdomain, will I still see it from any
other machine connected to the same backbone?

BTW, I use different processes and not threads (and thus shared memory)
because my program legacy on QNX 4.25! :confused: I am in the process of
getting my programs to work under RTP, but my legacy programs will be
there for now. I think that RTP is great, but I do not have time for
now to modify my programs to take full advantage of RTP.

Thanks…

Miguel.




Mario Charest wrote:

“Miguel Simon” <> simon@ou.edu> > wrote in message
news:> 3A2FB097.2BF02C1E@ou.edu> …
Yes, it is true, but I need to do all of this programmatically in an
embedded system. Once I deploy the system, the system is out of my
reach for months, and I want to have real-time access to the data
collected! So what I’ll do is to have the data collection program
connect to a server and relay the data.

What I wanted to do originally was to access this out-of-reach-box’s
shared memory from a laptop whenever I visit the site. I wanted to do
this to help me see in real time what is going on via Phab application.


I don’t see your point. Why could you do it with TCP/IP and not QNET?
Or did I missunderstood you > :wink:

Thanks…

Miguel.


Mario Charest wrote:

In theory if you use QNET you should be able to do the same.Qnet being
based on IP
.

Rennie…

Thanks for your reply.

John Doe wrote:

“Miguel Simon” <> simon@ou.edu> > wrote in message
news:> 3A2FC338.E5C9B3D9@ou.edu> …

Now, my understanding is that Qnet is meant to be used to access
data/files manually, but not programmatically. Correct? But if I am
not right, then I want to know! Please! > :slight_smile: > Moreover, if Qnet is
running in a machine in another subdomain, will I still see it from any
other machine connected to the same backbone?

You are wrong. Qnet can most definately be used programatically
(i.e. for IPC).

How would you do this? For example, I know how to use sockets and so
on. Do you mean that I can use Qnet as a transport protocol with
sockets on top of it? (In case this help, I learned to program in UNIX,
and my concepts are UNIX-like.)


If Qnet is running on another sub-(net/domain) it will be visible (if
configured
correctly) from other sub-(net/domain)s.

Qnet has an interesting array of QoS options, unavailable in POTCP/IP
(plain old tcp/ip).

Humm… I would have to investigate this. Pardon me (and enlighten me!
:slight_smile:, but when you say POTCP, this is not a typo, right?

btw: I am not trying to be abrupt with my response, only very clear

I appreciate your help, and I appreciate that you want to be clear. :slight_smile:
Thanks.

(since I am under the impression that English may not be your
primary language).

No, you are right. I speak Spanish (I was born in Cuba) and some French
on the side. I am learning Italian, Portuguese and German, perhaps
Russian some day, but definitely not Chinese! :slight_smile: However, I am fluent
in English, I am getting my Ph.D. in Aerospace Engineering (controls
area, flight mechanics, navigation, autonomous intelligent land and
aerial robotics systems, graduation = may 2001), I have a full time job
doing research for a very nice (fortune 500) tech company
(www.saic.com), my (recently married :slight_smile: wife is from Dexter, MI, attends
the School of Medicine at University of Michigan, and I have been a US
citizen for the better part of five years. Even though I do have an
accent, and my written english can be at times both broken and
reminiscent of my latin flavor, you can fire away in English, for I’ll
be able to understand you. If the case is that I do not understand,
chances are that new tech words are in the way in which case I’ll ask
you in due time for a clarification. :slight_smile: Since I am in the business of
learning, I usually do not hesitate to ask questions when research
yields little gain and time is a prime resource. But most importantly
and in any event and in all cases, I do appreciate your help! Thanks
again! :slight_smile:

BTW, I use different processes and not threads (and thus shared memory)
because my program legacy on QNX 4.25! :confused: I am in the process of
getting my programs to work under RTP, but my legacy programs will be
there for now. I think that RTP is great, but I do not have time for
now to modify my programs to take full advantage of RTP.

If you need to integrate one machine running QNX 4, and another running
RtP then Qnet is not an option (while TCP/IP of course is).

Yup. I already hit that wall.

Rennie

Thanks for your help. I appreciate it.

I do have a question for you: How in this world do I make my QNX RTP a
tftp server? The tftpd command does not work… I am sure that I
have some problems in the setup, but the docs do not help me much in
this case.

Bests…

Miguel

[cut]

How would you do this? For example, I know how to use sockets and so
on. Do you mean that I can use Qnet as a transport protocol with
sockets on top of it? (In case this help, I learned to program in UNIX,
and my concepts are UNIX-like.)

With socket you do sendv(), with qnet you do MsgSend(). As you may
have noticed MsgSend is the same function wether you talk
to a process that is local or on the network. Qnet IPC are MUCH
easier to use then socket IPC.

If Qnet is running on another sub-(net/domain) it will be visible (if
configured
correctly) from other sub-(net/domain)s.

Qnet has an interesting array of QoS options, unavailable in POTCP/IP
(plain old tcp/ip).

Humm… I would have to investigate this. Pardon me (and enlighten me!
:slight_smile:> , but when you say POTCP, this is not a typo, right?

POTCP == Plain Old Tcp :wink:


(since I am under the impression that English may not be your
primary language).


No, you are right. I speak Spanish

Ole!

(I was born in Cuba) and some French

on the side. I am learning Italian, Portuguese and German, perhaps
Russian some day, but definitely not Chinese! > :slight_smile: > However, I am fluent
in English, I am getting my Ph.D. in Aerospace Engineering (controls
area, flight mechanics, navigation, autonomous intelligent land and
aerial robotics systems, graduation = may 2001), I have a full time job
doing research for a very nice (fortune 500) tech company
(> www.saic.com> ), my (recently married > :slight_smile: > wife is from Dexter, MI, attends
the School of Medicine at University of Michigan, and I have been a US
citizen for the better part of five years.

Nice to meet you Miguel :wink:

BTW, I use different processes and not threads (and thus shared
memory)
because my program legacy on QNX 4.25!

Well depending on the data rate, native IPC are usualy preferable over
share memory.

Miguel

Miguel, responses below.

“Miguel Simon” <simon@ou.edu> wrote in message
news:3A2FFCEC.570FC6FC@ou.edu

Rennie…

Thanks for your reply.

John Doe wrote:

“Miguel Simon” <> simon@ou.edu> > wrote in message
news:> 3A2FC338.E5C9B3D9@ou.edu> …

Now, my understanding is that Qnet is meant to be used to access
data/files manually, but not programmatically. Correct? But if I am
not right, then I want to know! Please! > :slight_smile: > Moreover, if Qnet is
running in a machine in another subdomain, will I still see it from
any
other machine connected to the same backbone?

You are wrong. Qnet can most definately be used programatically
(i.e. for IPC).

How would you do this? For example, I know how to use sockets and so
on. Do you mean that I can use Qnet as a transport protocol with
sockets on top of it? (In case this help, I learned to program in UNIX,
and my concepts are UNIX-like.)

To add to Mario’s response:

Qnet is at a higher level of abstraction than sockets. With a socket you
must know that you are communicating over a network; with Qnet (QNX native
IPC) you (as the programmer) don’t do anything different whether you are
accessing a resource that will be local or remote. The only human that is
aware of the networking is the user of your program who supplies a resource
name that is non-local (e.g. /net/foo/bar as opposed to /foo/bar). Your app
simply does an open() of the supplied name and gets a file descriptor (fd)
which it then communicates with. Your code is completely unaware of the
resources location.

I do have a question for you: How in this world do I make my QNX RTP a
tftp server? The tftpd command does not work… I am sure that I
have some problems in the setup, but the docs do not help me much in
this case.

I actually haven’t tried tftpd. If I did, and it didn’t work, I wouldn’t be
surprised, since it was probably not a prime candidate for testing for the
first beta release.

Rennie