《Operating System Concepts》閱讀筆記:p286-p308
《Operating System Concepts》學(xué)習(xí)第 28 天,p286-p308 總結(jié),總計 23 頁。
一、技術(shù)總結(jié)
1.reentrant lock(可重入鎖)
(1)為什么稱為 reentrant lock?
A thread acquires a ReentrantLock lock by invoking its lock() method. If the lock is available—or if the thread invoking lock() already owns it, which is why it is termed reentrant—lock() assigns the invoking thread lock ownership and returns control.
(2)Python 中的 rerentrant lock
threading.RLock。
二、英語總結(jié)(生詞:2)
1.hazard
c. sth that is dangerous and likely to cause damage(危害,風(fēng)險,隱患)
示例:We also discussed various challenges in designing applications that are free from race conditions, including liveness hazards such as deadlocks (《Operating System Concepts》第 287 頁)。
在上面這個例子中,liveness 不是 harzard, deadlock是hazard, 是一種liveness hazard,即“l(fā)iveness hazard refers to situations where liveness is compromised, such as deadlock”。
2.adverse
(1) adverse: ad-("toward, against") + vetere("to turn")
adj. Adverse literally means "to turn against(反對),opposing(相反的)". having a negative or harmful effect on sth(負(fù)面的,不利的)。
(2)示例:
Obviously, if two readers access the shared data simultaneously, no adverse effects will result(《Operating System Concepts》第 291 頁)。
關(guān)于英語的注解同步更新匯總到 https://github.com/codists/English-In-CS-Books 倉庫。
三、其它
第 6 章(Synchronization Tools)簡評:介紹了 Crititical-Section, Peterson's Solution,Mutext Locks, Semaphore, Monitor, Liveness。因為對這些內(nèi)容不了解,所以對作者所說的內(nèi)容很難有切身體會,如 Synchronization Tools 包含哪些?那么問題就變成了:1、怎么把書上的內(nèi)容和實際應(yīng)用結(jié)合起來?2.自己不知道這些內(nèi)容,是因為平時工作中沒有用到,還是用到了但是因為自己忽視了?這是本人閱讀第 6 章的感受。
四、參考資料
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

歡迎搜索及關(guān)注:編程人(a_codists)
浙公網(wǎng)安備 33010602011771號