[comp.os.misc] QNX shared buffer.

gisle@ifi.uio.no (Gisle Hannemyr) (08/07/90)

I hope this is the appropriate newsgroup for questions about QNX.

I want to allocate a buffer that shall be used to share information between
several processes running on the same CPU.  Each process will run for a
short time, but I want the common buffer to exist "forever".

What I really want to do, is to write a program that mallocs some memory,
associate a name with it (so other processes can read it), and then dies,
leaving the malloced memory allocated and available for reads and writes
from other processes that knows its name.

1) Is this possible with QNX?  How?

If this is not possible, then:

2) How do I leave a program like that sleeping _forever_?  Preferably
   not using any cycles.

Any help is appreiciated.

- gisle hannemyr  (Norwegian Computing Center)
  EAN:   C=no;PRMD=uninett;O=nr;S=Hannemyr;G=Gisle (X.400 SA format)
         gisle.hannemyr@nr.no                      (RFC-822  format)
  Inet:  gisle@ifi.uio.no
  UUCP:  ...!mcvax!ifi!gisle
------------------------------------------------

bobm@anasaz.UUCP (Bob Maccione) (08/08/90)

In article <1990Aug7.105617.20133@ifi.uio.no> gisle@ifi.uio.no (Gisle Hannemyr) writes:
>
>I want to allocate a buffer that shall be used to share information between
>several processes running on the same CPU.  Each process will run for a
>short time, but I want the common buffer to exist "forever".
>
>What I really want to do, is to write a program that mallocs some memory,
>associate a name with it (so other processes can read it), and then dies,
>leaving the malloced memory allocated and available for reads and writes
>from other processes that knows its name.
>

why not make a small administrator that the other tasks can 'talk' to 
to exchange the data. The administrator wouldn't take any cpu time 
except when queried and then if you ever needed it on a network
the code changes would be either a: invisable(sp) or b: real easy.

NOTE: this doesn't mean it'll work with the new OS. That I don't know about.

OBquestion:

  anybody go to the QNX90  ( I assume that it already happened ) ?
  any notes/news would be nice to see. I can't afford to call the 
  BB and I noticed that 'they' dropped my login :(



bob maccione

frank@mnetor.UUCP (Frank Kolnick) (08/10/90)

In article <1990Aug7.105617.20133@ifi.uio.no> gisle@ifi.uio.no (Gisle Hannemyr) writes:
)I hope this is the appropriate newsgroup for questions about QNX.

	seems to be :-)

)I want to allocate a buffer that shall be used to share information between
)several processes running on the same CPU.  Each process will run for a
)short time, but I want the common buffer to exist "forever".

	as long as the tasks are all on the same node, you can allocate
	a segment, make it read/write, and give access to the relevant
	tasks. the segment belongs to the originating task, so that task
	will have to stay around.

	(described adequately in the manuals, much better in my book :-)
	which has coded examples and nice diagrams.
    available from Qering Software in Switzerland:  tel. 064-51 74 75,
	fax 064-51 75 10 )

)What I really want to do, is to write a program that mallocs some memory,
)associate a name with it (so other processes can read it), and then dies,
)leaving the malloced memory allocated and available for reads and writes
)from other processes that knows its name.

	you can't name the segment; perhaps you want a memory-mgt. task?
	(which can have a globally registered name)

)2) How do I leave a program like that sleeping _forever_?  Preferably
)   not using any cycles.

	'sleep' would do it. so would 'receive' (assuming no one sends
	it messages). depends on what you want the task to do (or not do).
	a sleeping task (like a rolling stone) consumes no cycles.	
	am I misunderstanding your question?


-- 
Frank Kolnick,
Basis Computer Systems Inc.
UUCP: {allegra, linus}!utzoo!mnetor!frank

mtheil@netmbx.UUCP (Matthias Theil) (08/15/90)

bobm@anasaz.UUCP (Bob Maccione) writes:


>OBquestion:

>  anybody go to the QNX90  ( I assume that it already happened ) ?
>  any notes/news would be nice to see. I can't afford to call the 
>  BB and I noticed that 'they' dropped my login :(

	QNX'90 ? Never heard about that !! When will it happen and
where ? Have someone detailed informations about or any official material ?

		Matthias
-- 
Matthias Theil - Bundesplatz 12a - D-1000 Berlin 31 - ++49 (0)30 85 47 67-3
UUCP: mtheil@netmbx.UUCP      -=*=- 	BITNET : mtheil%netmbx@db0tui6.bitnet
"Shields, check. Deflectors, check. Halon extinguisher, check. Asbestos 
suit, check. Gas mask, check. SCBA, check. OK - post it !" -Unky Dave