Concurrent – Select consistency model for concurrent programming language

I am in the design phase of a programming language, and I am currently considering concurrency. I need to find a consistency model, that is, how to process data through concurrent processes programmed in this language.

There are two important criteria:

>I prefer ease of use to performance, as long as the consistency model allows good scaling,
>I can’t use it and need to block Or the consistency model of dynamic memory allocation.

My two current candidates are non-blocking software transaction memory on the one hand, and copy message passing semantics without sharing la Erlang.

< p>I am particularly worried about ease of use, so I will introduce my main arguments for each of these two models.

For STM, the user must understand that the members of the class must mutate atomically and be correct Divide the atomic code segments carefully. These must be written so that they can be repeated an undefined number of times, they may not perform any I/O, may not call certain external functions, etc. I think this is for inexperienced programmers It’s easy.

Erlang-style shared-nothing concurrency is attractive, but there is a problem: real-time processes cannot copy the objects they send because they cannot perform any memory allocation, so the objects must be from a process “Move” to another process through the queue. The user must know that if a real-time process has references to two objects, then if he sends the object to another process, then both references will be cleared. This is a bit weak The pointer, at any point of use, may or may not be empty: it may be surprising.

I prefer the second model because it looks easier to understand and it naturally Extend to distributed systems.

Do you have any recommendations?

>Non-blocking software transaction memory?
> Erlang-style concurrency and the difficulty of real-time constraints?
>Any other things I haven’t considered?

I have done a little with Erlang, but not much, but although there is no shared messaging example It is new to me, but I will say that it is easy to understand visually and physically.

If your language is to be widely spread, I will say that the Erlang style is at least I can A problem to be solved without much work. I assume that others will be able to learn and apply this model more easily than the STM method.

I am not speaking based on experience, but it seems that the Erlang model is easier Implementation, because it does not need to deal with a lot of low-level memory operations, you only need to share anything and manage the memory flow between memory transfers.

I am in programming In the design phase of the language, concurrency is currently being considered. I need to find a consistency model, that is, how to process data through concurrent processes programmed in this language.

There are two important criteria:< /p>

>I prefer ease of use to performance, as long as the consistency model allows good scaling,
>I cannot use a consistency model that requires blocking or dynamic memory allocation.

My current two candidates are non-blocking software transaction memory on the one hand, and copy message passing semantics without sharing la Erlang.

I am particularly worried about ease of use, so I will introduce my opinion The main argument of each of these two models.

For STM, the user must understand that the members of the class must mutate atomically and divide the atomic code segments correctly. These must be written so that they can be repeated Undefined number of times, they may not perform any I/O, may not call certain external functions, etc. I think this is easy for inexperienced programmers.

Erlang style no sharing Concurrency is attractive, but there is a problem: real-time processes cannot copy the objects they send because they cannot perform any memory allocation, so objects must be “moved” from one process to another through the queue. The user must know if A real-time process has references to two objects, so if he sends the object to another process, both references will be cleared. This is a bit like a weak pointer, which may or may not be empty at any point of use Empty: It may be surprising.

I prefer the second model because it looks easier to understand and it naturally extends to distributed systems.

You have What is recommended?

>Non-blocking software transaction memory?
> Erlang-style concurrency and the difficulty of real-time constraints?
>Any other things I haven’t considered?

I have done a little with Erlang, but not much, but although no shared messaging paradigm is new to me, I will say It is easy to understand both visually and physically.

If your language is to be widely spread, I would say that Erlang style is at least a problem I can solve without much work. I assume that other people will be able to learn and apply this model more easily than the STM method.

I am not speaking based on experience, but it seems that the Erlang model is easier to implement because it does not need to deal with a lot of low-level memory Operation, you only need to share any content and manage the memory flow between memory transfers.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 4819 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.