Consider the figure below showing a hypothetical situation. A criminal holds an hostage and against that, a cop (policeman) also holds an hostage who is a friend of the criminal. In this case, criminal is not going to let the hostage go if cop won't let his friend to let go. Also the cop is not going to let the friend of criminal let go, unless the criminal releases the hostage.
Analysing the situation from an Operational System´s point of view, a correct conclusion is
- A. a starvation occurs when multiple processes try to access the same resource at the same time.
- B. when two threads need two different resources and each of them has the lock of the resource that the other need, it is a deadlock.
- C. a lock occurs when one thread is still holding on to another resource that the second thread wants after it finishes.
- D. a starvation occurs when the waiting process is no more still holding on to another resource that the first needs before it can finish.
- E. deadlocks will only occur when two or more threads can be acquired in different times and they are grabbing no resources.