IN[59]570 Exercise Session 4
Concurrentum is bonum
Joachim Tilsted Kristensen
joachkr@ifi.uio.no
University of Oslo, February 23, 2023
Lets talk about synchronization.
discuss with the person on your right.
- What is a monitor?
- What is the purpose of a monitor.
- What are alternatives to a monitor?
- What is a message passing?
- How do you get mutual exclusion with a monitor?
- How do you get mutual exclusion with message passing.
- Are they equivalent kinds of message passing?
Parameter Parsing.
The version of Emerald we handed out implements
call-by-object-reference. Which means that a variable is essentially
implemented by a pointer to a structure.
It could have implemented call-by-move or call-by-visit. See Eric's
notes on how to implement call-by-visit.
Now, suppose an object A on node N1 has a function f and we call
A.f[B] on an object B located at another node N2. As a function of how
many times f uses B, and how large B is, when is it faster to use
call-by-visit?
Attachments.
Look up the keyword attach in the language report.
- What are the semantics of
attach? - Look in the (standard library)[https://github.com/emerald/src-versions/tree/master/ubc-latest-src/Builtins] for a ussage of
attach. - Why did the library implementer use
attachhere?