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.

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。

推薦閱讀更多精彩內(nèi)容

  • 桔子給我留言,“五月姐,我給她打了四個電話,每一個都在通話中?!?1桔子喜歡的姑娘是個幼兒園老師,不用說,一定是溫...
    素九艾閱讀 59,941評論 30 41
  • 01 昨天我在簡書上的第49篇文章,出現(xiàn)在了熱門文章里,到目前為止的閱讀量是1993,收獲了111個喜歡。 昨天成...
    苦瓜有點兒甜閱讀 514評論 21 29
  • 品酒, 小酌怡情一杯,再潻則成惡夢,享受變成了難受。 吟詩, 爛熟宋唐三百, 不如把玩一句,舉一反三領(lǐng)會。...
    王卓族閱讀 326評論 0 1
  • 遇見你,那時好天氣 你穿著樸素外衣,眉目清麗 我說你好,你微笑 后來一人守一城 長江水長常如鏡 抬頭望云猜你,如遇...
    今子閱讀 152評論 0 0
  • 曾經(jīng), 有一個渺小的愿望。 后來, 變成了隨風(fēng)飄搖的夢想。 在成長中, 那微乎的夢想早已丟失與遺忘。 在時間的流逝...
    林蔭路單車響閱讀 312評論 0 1