What is * deterministic concurrency *?

I heard that there are 3 kinds of concurrency.

  • Deterministic concurrency
  • Concurrency messaging
  • General concurrency status

I know # 2 (= actor model) and # 3 (= general streaming), but not # 1. What is this?

+4
source share
2 answers

The deterministic concurrency is a parallel programming model, so the programs written in this model have the following property: for a given set of inputs, the output values โ€‹โ€‹of the program are the same for any execution schedule. This means that program outputs depend solely on program inputs.

There are ways to provide this property. One way is the so-called programming with one assignment, in which variables should not be initialized, but can be assigned no more than once. Reading the uninitialized variable stalls until a value is assigned (possibly by some other thread). The Mozart programming language supports them.

Another way is to use property analysis to determine which proprietary "streams" use different links, and to ensure that no thread writes a link at the same time, so there is no data calculation.

+4
source

I have not heard this term, but coroutines come to mind. They do not provide โ€œtrueโ€ concurrency in the sense that only one subroutine is executed at any given time, but they are parallel in the sense that a group of interacting coroutines can make progress without waiting for each other to complete.

0
source

Source: https://habr.com/ru/post/1341090/


All Articles