Subject: Re: SDL-News: Identification of block instances?
From: Rick Reed TSE (rickreed#tseng.co.uk)
Date: Fri Oct 09 1998 - 21:46:48 GMT
The originator of this message is responsible for its content.
-----From Rick Reed TSE <rickreed#tseng.co.uk> to sdlnews -----
At 15:48 +0100 9/10/98, Sergio Lopes wrote:
>Suppose we declare a block type with N initial instances and N maximum
>instances. Suppose inside the block type there is one instance of a certain
>Is there any way for the process to know at which block instance it belongs
>Can N be a variable defined at system startup? If so, how to do it?
The simple answer to these question is "There is no (easy) way that the
block instance can be identified and N cannot be a variable (it has to be a
statically determined integer value)."
The experts' group is aware of these limitations and we are currently
considering how to overcome them by using "Gate Types" and/or dynamic
creation of blocks.
The longer answer is that:
It is possible in SDL-92 to devise elaborate initialisation schemes where
processes and blocks are allocated numbers by a central server process and
these are communicated to other processes either in the startup phase or on
demand via remote procedures. However, while this can be made to work, it
would be preferable to have a built-in language feature to avoid the
The general scheme for the case that you mention would be that one unique
process (call it the "block identity process" (bip) ) in the replicated
block calls the (unique in the system) server by a remote procedure call in
its startup transition to be allocated a block "instance number" which is
returned as an answer. The server process stores the Pid of of the bip
against the "block number". Processes that need to communicate with the
block can find the Pid of the bip in two ways:
a) by calling the server by a remote procedure call in their own startup
transition to get a copy of the bip number to Pid map;
b) calling the server (at any time) to get an individual Pid for a block
(a) is more efficient but makes the startup more complex. (b) is more flexible.
The server process needs to be designed so that it saves any other requests
until all the block instances have been allocated a number. If there are
several blocks of this kind, the system gets more complicated.
The bip process can either be used to handle all signals to the block, or
this process and the block can be designed so that once a process has
communicated with the block the Pid of processes within the block are
returned to the caller.
Without dynamic block creation, the fact that the number of blocks is fixed
for the system instantiation seems to be no great problem. To change the
actual number of blocks the value can be based on an external synonym.
So you can do what you wnat, but SDL-2000 should be better.
-- Rick Reed, TSE Limited 13 Weston House, 18-22 Church Street Lutterworth Leicestershire LE17 4AW United Kingdom Tel +44 14 55 55 96 55; Fax +44 14 55 55 96 58 Mob +44 79 70 50 96 50 email: rickreed#tseng.co.uk http://www.tseng.co.uk ftp://ftp.tseng.co.uk/tseng/
-----End text from Rick Reed TSE <rickreed#tseng.co.uk> 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