Re: SDL-News: How to share variables among processes?


Subject: Re: SDL-News: How to share variables among processes?
From: Elie Cohen (cohen#verilogusa.com)
Date: Tue Jan 26 1999 - 00:00:36 GMT


The originator of this message is responsible for its content.
-----From "Elie Cohen" <cohen#verilogusa.com> to sdlnews -----

Hello All,

Dagbjørn is quite right, having services share the parent process variables
is one other way of making 2 finite state machines communicate.

I thought I'd add a couple more points to the drawbacks of services though.

1/ Services cannot be instanciated like processes (although the parent
process can),

2/ They do not have their own PId, since they are not processes, forcing
them to 3

3/ Their input signal sets must be disjoint (like Dagbjørn mentioned it),
because they do not have an individual address,

4/ The very fact that they share the parent process variable is rather
"ugly", and a GLOBAL-like sort of data sharing,

5/ The simple fact that they have to share the parent process thread of
execution (services do not get one of their own), does not garantee that the
variables they share are consistant. If one such variable is a structure and
the members are not ALL updated in a single transition, then there is a risk
of inconsistancy, and you need to resort to some sort of locking
mechanism...

For all these reasons, services are to be used with caution, and COPIOUSLY
documented.

Anyway, Dagbjørn and I forgot the most important question. What are you
trying to accomplish?

-----End text from "Elie Cohen" <cohen#verilogusa.com> to sdlnews -----
For help, email "majordomo#sdl-forum.org" with the body of your email as:
    help
or (iff this does not answer your question) email: owner-sdlnews#sdl-forum.org



This archive was generated by hypermail 2a23 : Sun Jun 16 2013 - 10:41:40 GMT