Lecture 6 Flashcards
What is Deadlock
- 2 processes each waiting for the other to release a resource being held so processes can advance.
- Stuck in a circular wait
What is starvation
-Starvation occurs when a process waits for
a resource indefinitely.
Deadlock vs Starvation
Deadlock implies starvation, but starvation does not imply deadlock
Deadlock can occour on what level
Hardware (like for memory) or software, for sending messages
What are the conidtions for deadlock
- Mutual exclusion
only one process may use resource at a time - Hold and wait
a process may hold allocated resources while waiting to receive others requested - No pre-emption
no resource may be forcibly taken from a process holding it
What is circular wait
a closed chain of processes such that each holds ≥ 1 needed by next process in
chain
What can we do to prevent deadlock
- prevention
- detection
- avoidance
How can we prevent deadlock?
-Disallow mutual exclusion: so must be one at a time
(but not really feasible)
-Hold and Wait: require a process to request all of its resources before it begins running (effective, but wasteful)
-Pre-emptiom (allow pre-emption): a process requesting resources may be denied and have resources taken away
from it
-OR-
a process already holding resources is denied further requests because another
process is already waiting for [other] resources
(this works, but not really useful for many resources)
-Circular Wait: Assign an ordering to resource types, so requests must be in order
(works, but wasteful)
-Ostrich: Stick you head in the sand and hope for the best (most OSs already do this)
OSI Layer 1 needs _____ transfer to occur for the movement of the data.
energy
Wire is susceptible to
Noise and degradation
What is wire noise?
Since wire is a conductor, any electromagnetic field that moves past it can induce electricity, in the wire. Rise in tempature can indicate this.
Two types of signals for transmitting data can be:
analog (continuous valued) or digital
Copper wire benifit?
Short distances, inexpensive, but always has thermal noise
Any signal on wire is subject to:
Attenuation with distance and noise
What do signal amplifers do?
Take a weakened signal and repeat to increase distance, both analog and digital