《Operating System Concepts》閱讀筆記:p309-p330
《Operating System Concepts》學習第 29 天,p309-p330 總結,總計 22 頁。
一、技術總結
1.Python 中的并發編程
(1)semaphore
class threading.Semaphore(value=1)。
(2)condition variable
class threading.Condition(lock=None)
書上使用的是 Java, 因本人在開發工作中使用的是 Python, 所以補充一些 Python 相關的內容。平時都沒注意到這些(Python 官方文檔:The Python Standard Library ? Concurrent Execution ? threading — Thread-based parallelism),是我孤陋寡聞了。當然,現在只是知道了,還是不知道應用場景是什么,何時使用。
2.memory transaction
A type of memory supporting memory transactions.
3.dead lock
(1)定義
The state in which two processes or threads are stuck waiting for an event that can only be caused by one of the processes or threads.
(2)Necessary Conditions
1)Mutual exclusion
2)Hold and wait
3)No preemption
4)Circular wait
二、英語總結(生詞:2)
1.coherency
(1)coherence: co-("together") + haerere("to adhere, stick")
u. sth logically or structurally connected and consistent(連貫性)。
(2)coherence vs coherency
兩者意思一樣,暫時沒看出有啥區別,先記錄。
1)However, HTM does require that existing cache hierarchies and cache coherency protocols be modified to support transactional memory(《Operating System Concepts》第 312 頁)。
2)Discuss, with examples, how the problem of maintaining coherence of cached data manifests itself in the following processing environments:
a.Single-processor systems
b.Multiprocessor systems
c.Distributed systems
2.a priori
adj/adv. presupposed by experience(憑經驗預設的),兩個詞組合形成一個形容詞。
示例:Note that the resources must be claimed a priori in the system(《Operating System Concepts》第 333 頁)。
關于英語的注解同步更新匯總到 https://github.com/codists/English-In-CS-Books 倉庫。
三、其它
第 7 章(Synchronization Examples)簡評:本章介紹了 synchronization 在 POSIX 系統、在 Java 中的應用。
四、參考資料
1. 編程
(1) Abraham Silberschatz,Peter Baer Galvin,Greg Gagne《Operating System Concepts》:https://book.douban.com/subject/30272539/
2. 英語
(1) Etymology Dictionary:https://www.etymonline.com
(2) Cambridge Dictionary:https://dictionary.cambridge.org

歡迎搜索及關注:編程人(a_codists)
浙公網安備 33010602011771號