O Euromicro, 1975 North-Holland Publishing Co., Amsterdam
THE CO~MUNICATEUR: A MULTI MICROPROCESSORS SIMULATION TOOL.
Michel DUPUY I n s t i t u t de Programmation Universit~ Pierre et Marie CURIE Paris, France
eliminated because i t needs a too heavy management of access conflicts to those mail-boxes.
Abs trao t A specialized mechanism permitting asynchronous and simultaneous con~unications not only among active partners (such as microprocessors) but also with passive partners (such as storages or passive resources) is proposed. A prototype of this mechanism using several minicomputers to emulate different kinds of microprocessors is described. The purpose of this prototype is the simulation of the co.~unications in a distributed multi-microprocessors system.
The exchange system we retained, is based on a p a r t i t i o n of the commonmemory ( f i g . 1) : we assign at a given time to each interlocutor of the system (process, device), several memoryareas, each area corresponding to an exchange quantum. Whenever an interlocutor of the system wants to co~nunicate with another one, i t f i l l s one or more areas belonging to i t s own space. Only the processor where the emitter process is located works with the common memory. Afterwards the processor transmits to the target processor the name of this or those areas. This is achieved by using a single straightforward communication between the processors. These areas are now belonging to the target process. The lock time between the two processors is then reduced to the communication time of the area names, which is a very short communication.
Multi-microprocessors communications The main problem of a distributed system using microprocessors [1 ] is actually communications among different processors. Interrupt mechanismes of microprocessors avalaible at the present time are r e l a t i v e l y slow and s t i l l reduces the, already low speed of microprocessor. Exchanges between two microprocessors through interrupt mechanism becomes too heavy. In a multi-microprocessors system the t o t a l amount of communications may increase at an exponential rate according to the number of nodes. In order to reduce the managementas well as superfluous communications, the processors have already been specialized and provided with resources which are s t r i c t l y necessary to t h e i r tasks [2 ] . Nevertheless, we have to deal with the remaining communications among a l l the processes which are located in d i f f e r e n t processors. In most computer networks, communications between processors are d i r e c t l y accomplished; this means that both processors are simultaneously locked during i n f o r mation transfers. Such procedure is not e f f i c i e n t enough because in most cases the target process cannot handle the informations immediatly. In fact there is no reason to disturb the processor which contains the target process for that information transfer.
PI is producing a message in its own areas,
PI is transmitting the area names where the message is located.
Communicat.ion space The message is now in the P2 co.~nunicatlon space.
In order to avoid such a mutual lock between processors, the amount of communications can be reduced by a commonmemory for the set of processors. Moreover the usual mail-box mechanism has been
f i g . I: 21
The communication space.
22
M. DUPUY
Simulation
and the optimal size of the areas which are associated to each processor inside the communication space. On the other side, the model is essential to extend the results obtained with this prototype and to design the future evolution of the system.
To choose the different parameters of Such a communication system and transmission software we have not only wired a prototype (Con~nunieateur), but also we have used a SIMULA67 model of this communication system.
Design of the prototype 1°) Hardware simulation 1°) General considerations The present version of the eon~nunieateur permits complete dialog among four partners. Such a realization is essential to study the common memory managementand also the timing problem for sequential and simultaneous access to different partners. Three of these partners are active (minicomputers) one is passive (common core memory). Minicomputers are chosen to permit the emulation of different kinds of microprocessors. I t is interesting to note that the prototype is b u i l t with a set of identical boards for each partner. Indeed the peculiarities of each partner are provided by the connections achieved on the back panel. This makes extension from three to more active partners easy. 2° ) Software simulation The model of the system, described in SIMULA 67, is particularly useful for the evaluation of the communication burden among the different partners
In order to build and experiment this special type of communications, we have designed the eorr~nunioateur which is a device permitting to realize the different connections between processors, common memory and peripheral units [3 ]. Each partner is given two registers : the communication register containing the information to be transmitted, and the operation register containing the target partner address and all informations needed for exchange. To each register is associated an elementary bus. All buses are connected to each partner through a multiplexer. The address part of the operation register is continuously decoded, an interrupt signal is sent to the target partner, which can read the emitter partner communication register (fig. 2). When the target partner reads the content of the emitter partner communication register, the address
PROCESSOR
I
BUS
DATA OUT
II
I CO~AUNICATION REGrSTKR
SELECTOR
L CONTROL BUS
,
II
PARTNER n DATA BUS PARTNER n-1
DATA BUS
PART.VER I DATA
~ELECTOE
INTERRUPT LINE PARTNER n interrupt llne8
Fig. 2: Logical diagram.
It
i
THE COMMUNICATEUR: A MULTI MICROPROCESSORS SIMULATION TOOL
of the later is loaded in the emitter operation register. So, the emitter can detect the end of the elementary exchange by receiving an interrupt from itself. In addition we have introduced the following features: - Any active partner can read the content of the communication register of any other partner. I f i t is not a target partner, no modification of the emitter partner's operation register is performed. This permits to spy the different communications inside the system and easy debugging the system. - A signal is provided to the emitter partner after a setable given delay i f the information has not been taken by the partner to which i t was sent. This avoid dead locks.
23
The exchange with the communication areas are in most cases achieved in a sequential way, so we found i t convenient to privilege this type of access To perform an exchange, a processor has to send the starting address of the area in i t s own pointer register; then i t exchanges the informations and i t lets the memorymanage i t s e l f the address increment. In another way, the m u l t i p l i c i t y of communication and pointer registers belonging to each active partner allows the memory to simultaneously deal with several partners. Finally, the maximumnumber of simultaneous communications is equal to the number of active partners. Access conflicts to memory are eliminated, since each partner belongs i t s own couple of registers. Of course the memory multiplexing mechanism is fast enough to l e t each partner act as i f an independant memory space were allocated to i t . Naturally, this w i l l put a l i m i t to the number of partners that can be connected.
2°) Exchange operations Whenever a partner wants to communicatewith another, i t must accomplish two main operations: 1°- To load his own communication register with the information to be transmitted. This implies that this register is already free, i . e . there is no information waiting for transmission to other partners. 2°- To load his own operation register with the address of the target partner. The decoder associated to i t w i l l generate an interrupt signal sent to the concerned partner.
I
:
!
i
Whenever a partner receives an interrupt signal, two operations must be accomplished: 1°- To find out the partner emitting this signal This is done by actually consulting the operation registers of all connected partners his own included. 2°- I f the interrupt signal arises from a partner other than i t s e l f , the information contained in the communication register of the emitting partner is read; this w i l l modify the content of the operation register of the same partner I f , on the other hand, the interrupt signal arises from i t s e l f , this w i l l mean that the previous exchange has been accomplished. A new exchange w i l l be started, or his own operation register w i l l be put in an idle state, i f no further communications are needed.
COHE MEMOR/
-~MULTI~-~PLEXING
il,
[.~DRrSS ,~L'C.I R/W CO;.IMAV .' D I, Tr1~%"
i
L •
i l AP n
~
3° ) The communicationspace The Dreceding procedure permits to realize all physical communicationsbetween active partners of the system as well as communications coming from processors and destinated to the commonmemory. The commonmemory is called a passive partner because of i t s unability to i n i t i a t e an exchange by i t s e l f . We have provided this memorywith as many communication and pointer registers as existing active partners ( f i g . 3).
Fig. 3:
The commonmemory.
24
M. IXIPLIY
Experimentation This prototype is used to determine a minimal subgraph of communications amongmicroprocessors. To reduce the amount of simultaneous connections we just have to give each processor a table which contains the address of a l l the target partners. By adjusting this table we can modify the communication graph. So we experiment all the possible communication outlines: ring [4 ] , star {5 } and so on. On the sameway, i f something f a i l s , the connection graph may be dynamically rebuilt. The extension of physical communications among microprocessors to logical communications among processes is very easely realized. We just have given to each processor a localization table of processes which are in commonmemory and an identical communicationswitching nucleus. Conc]usion Using the different studies and mesurements previously discribed and with the possibilities of the actual MSl components, i t was possible to design a real prototype having the following features - The commonmemory is composedof several physical independant areas madewith static RAM. These areas can switch to different partners. All information exchanges between a partner and the momentarily associated areas must be controlled by the partner i t s e l f . Each area is associated to one and only one partner at a given time. This prototype is presently being developped.
References [ 1 ] M. CHEMINAUD,C.GIRAULT Conception d~un systeme ~ ressources distributes 1974 Institut de Programmation.
[ 2 ] M.CHEMINAUD, A.SCRIZZI Un 8yst~me de communications: logiciel ou materiel ? Colloque sur la programmation, PARIS april 1974
[ 3 ] M.DUPUY, G.NOGUEZ, J.SUCHARD Processeurs sp~cifiques asynchrones. Structures r~sultant d'un groupementde processeurs november 1973 Saint Pierre de Chartreuse.
[ 4 ] E.E.NEWHALL, A.N.VENETSANOPOULOS Computer con~nunications representative 8ystem8 IFIP 1971.
[ 5 ] J.N.POTVIN, P.CHENEVERT, K.C.SMITH, P.BOULTON Star-ring: a computer intercommunication and I/O system. IFIP 1971.
[ 6 ] D.J.FARBER, K.C.LARSON ~hestructure of a distribwted computer system The communication system. Symposium on computer networks Brooklyn april 1972.