Message Passing

0.0(0)
studied byStudied by 2 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/14

flashcard set

Earn XP

Description and Tags

Communication models, erlang messaging, concurracy

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

15 Terms

1
New cards

What is significant for synchronous communication?

the send operation blocks and waits for the receive operation

2
New cards

What is significant for asynchronous communication?

a sender can continue without waiting for the receive operation

3
New cards

What is true for asynchronous communication?

sender does not block waiting for receiver

4
New cards

Can a synchronous communication interface be used in an asynchronous way?

yes, by performing the send operation in a separate thread

5
New cards

What is the difference between the two nodes that are communicating using a stream socket API?

nothing, they have equal rights and responsibilities

6
New cards

The Erlang call gen tcp:recv(Socket, 0) will return:

the first part (possibly the whole) message sent to Socket

7
New cards

A server using a stream socket API can communicate with several clients and separate the streams by:

creating a new stream socket for each connecting client

8
New cards

How do Erlang processes communicate?

asynchronous message passing

9
New cards

Does Erlang provide a form of location transparency?

Yes - a process can use a process identifier without having to know the address of the node where the process lives.

10
New cards

How is the destination defined in an Erlang send operation?

as a process identifier or a local or remote registered name

11
New cards

What will prevent an Erlang process from sending a message to a process on another Erlang node?

the two nodes do not have the same secret cookie

12
New cards

Message sending in Erlang provides the following semantics:

best effort FIFO delivery of message

13
New cards

Can we have a circular construction in Erlang?

yes, processes can refer to each other in a circular way

14
New cards

What happens with Erlang processes that are suspended on a receive statement but no longer referenced by any process?

they will remain if registered, otherwise removed by the garbage collector

15
New cards

Assume we have three Erlang processes: A, B and C.

Also assume that A sends a message, m1, to B and then sends a message, m2, to C. B is suspended, waiting for a message from A that it will send to C.

What is guaranteed by the Erlang semantics.

no guarantees on receiving nor ordering of messages