美文网首页
1. Concurrency

1. Concurrency

作者: 何大炮 | 来源:发表于2017-08-09 10:46 被阅读0次

    How to define the "Concurrency":

    If there is no observer who can identify 2 events in the strict sequence, then the 2 event can be considered as concurrency.

    what kind of chaos concurrency can make:

    1. non-deterministic phenomenon
    2. non-observable system state
    3. results may not depend on the input and parameters
    4. non-reproducible

    Attention:

    1. the program that is concurrent on the higher abstraction level is always sequential on the lower abstraction level.
    2. vise versa.

    Concurrent program: several sequential process or threads are executed concurrently.

    From now on, we need to interact so that those tasks can be executed concurrently.

    "Interaction" has 2 forms:

    1. contention(implicit): concurrent tasks compete for a shared resource.
    2. communication(explicit): information passing or synchronisation.

    To solve those problem, we consider the sequence of interaction points, that is, hold true for every possible sequence of interaction points.(interleavings)

    The correctness of Concurrency: having the input, then we are able to obtain the output and the relationship between output and input.
    There are also 2 properties of Concurrency : Safety and Liveness

    A concurrent system is a system in which multiple task can be executed at the same time.

    相关文章

      网友评论

          本文标题:1. Concurrency

          本文链接:https://www.haomeiwen.com/subject/jfjfrxtx.html