1. Concurrency

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桔子喜欢的姑娘是个幼儿园老师,不用说,一定是温...
    素九艾阅读 60,055评论 30 41
  • 01 昨天我在简书上的第49篇文章,出现在了热门文章里,到目前为止的阅读量是1993,收获了111个喜欢。 昨天成...
    苦瓜有点儿甜阅读 3,395评论 21 29
  • 品酒, 小酌怡情一杯,再潻则成恶梦,享受变成了难受。 吟诗, 烂熟宋唐三百, 不如把玩一句,举一反三领会。...
    王卓族阅读 2,635评论 0 1
  • 遇见你,那时好天气 你穿着朴素外衣,眉目清丽 我说你好,你微笑 后来一人守一城 长江水长常如镜 抬头望云猜你,如遇...
    今子阅读 1,066评论 0 0
  • 曾经, 有一个渺小的愿望。 后来, 变成了随风飘摇的梦想。 在成长中, 那微乎的梦想早已丢失与遗忘。 在时间的流逝...
    林荫路单车响阅读 2,312评论 0 1