1 / 9

ABCL/1

ABCL/1. ABCL1. Actor Based Concurrent Language More pragmatic approach than ACTORS. Types of Message Passing in ABCL. Message sending order from one object to another is preserved in ABCL. Three types of message passing mechanisms Past Non-blocking messages without a reply Now

kathie
Download Presentation

ABCL/1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ABCL/1

  2. ABCL\1 • Actor Based Concurrent Language • More pragmatic approach than ACTORS

  3. Types of Message Passing in ABCL • Message sending order from one object to another is preserved in ABCL. • Three types of message passing mechanisms • Past Non-blocking messages without a reply • Now Blocking messages with sender waiting for a reply • Future Non-blocking messages with a reply expected in the future

  4. Mode of Message Passing • Two mode of message passing • Express • Higher priority • Interrupting current message processing • Non interrupting current message processing • Ordinary

  5. The Concept of Future EObject subclass: #Future instanceVariables: ‘value semaphore’ initialize semaphore := Semaphore new value semaphore wait. ^value reply: aValue value := aValue. semaphore signal doesNotUnderstand: aMessage ^self value performMessage: aMessage Future class new ^super new initialize

  6. Eager Communication Actor subclass: #ABCLActor futureCall: aMessage | aFuture | aFuture := Future new. aMessage arguments at: aMessage arguments size put: aFuture. self asynchronousSend: aMessage. ^aFuture • The future is transmitted as the reply destination of the message • We assume that the reply destination is always specified as the last argument of the message

  7. Synchronous Communication Actor subclass: #ABCLActor nowCall: aMessage ^(self futureCall: aMessage) value

  8. Implementation of the 3 types of message passing Actor subclass: #ABCLActor doesNotUnderstand: aMessage ^aMessage isEmpty ifTrue: [self asynchronousSend: aMessage] ifFalse: [aMessage arguments last == #future ifTrue: [self futureCall: aMessage] ifFalse: [aMessage arguments last == #now] ifTrue: [self nowCall: aMessage] ifFalse: [self asynchronousSend: aMessage]]]

  9. References • Yonezawa, A., et al., Object-Oriented Concurrent Programming in ABCL/1, OOPSLA 86 Proceedings,  SIGPLAN Notices, vol. 21, no 11, pp. 258-268

More Related