So I am asked to find from which of these four cases is a semaphore needed to avoid the creation of a deadlock. I am not sure I have grasped this idea yet, so some help would be appreciated!
- Keyboard
- Network Card (wifi)
- A space in memory which can be accessed by many process for change in the data (e.g. shared memory)
- Reading from a optical disk
If I were to guess, I wound probably go with number one only, because the keyboard has to be accessed by only one process at a time. However, I am not sure about any of these. Thanks :)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…