abcl 1 n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
ABCL/1 PowerPoint Presentation
Download Presentation
ABCL/1

Loading in 2 Seconds...

play fullscreen
1 / 9

ABCL/1 - PowerPoint PPT Presentation


  • 153 Views
  • Uploaded on

ABCL/1. ABCL\1. 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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'ABCL/1' - kathie


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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
abcl 11
ABCL\1
  • Actor Based Concurrent Language
  • More pragmatic approach than ACTORS
types of message passing in abcl
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

mode of message passing
Mode of Message Passing
  • Two mode of message passing
    • Express
      • Higher priority
        • Interrupting current message processing
        • Non interrupting current message processing
    • Ordinary
the concept of future
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

eager communication
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
synchronous communication
Synchronous Communication

Actor subclass: #ABCLActor

nowCall: aMessage

^(self futureCall: aMessage) value

implementation of the 3 types of message passing
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]]]

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