Download presentation
Presentation is loading. Please wait.
Published byMatilda Terry Modified over 5 years ago
1
CSP-Style Rendezvous Communication Thomas Feng, Edward Lee, Yang Zhao
Rendezvous Domain Built based on the understanding and previous implementation of the CSP (Communicating Sequential Processes) domain. No buffer on the communication channels. The processes are implemented as Ptolemy actors running in their own threads. When two or more actors communicate via the communication channels between them, a rendezvous (consensus) must be made. Merge and Barrier Barrier – get from all the input channels at once. Merge – get from any of the input channels, and output to its single output channel. Barrier and Merge are not processes They are primitive coordination operators. There is no delay between input and output. Atomic Operations In addition to the operations for getting from input ports and putting to output ports available in other domains, the Rendezvous domain provides finer-grain operations. 1. getFromAll. Get from all the input channels, and return the array of tokens. Barrier uses this atomic operation. 2. putToAll. Put to all the output channels. 3. getFromAny. Get from any of the input channels, and return a single token. 4. putToAny. Put to any of the output channels. 5. getFromAllPutToAll. Get from all the input channels, and put the tokens directly to the corresponding output channels. 6. getFromAnyPutToAll. Get from any of the input channels, and put the token directly to all the output channels. Merge uses this atomic operation. (Display1 ← Ramp1 OR Ramp2 ) AND (Display2 ← Ramp3 OR Ramp4) More complex logic operations for process coordination. Resource Management The Pool has a shared resource that can be granted to one Sleep actor until it is released. Sequencing Control The outputs of two independent tasks are sequenced before sending to the Display. (Arbab, Farhad. A Behavioral Model for Composition of Software Components. L'Object ) A Barrier implements the “AND” semantics on its input channels (“get from all”); a Merge implements the “OR” semantics on its input channels (“get from any”).
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.