TRE PR 2017 — Questão 55 · Língua Inglesa - Compreensão e Interpretação de Texto
Língua Inglesa - Compreensão e Interpretação de Texto
TRE PR · Inglês
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.

Cop: Thead #1 demands resource #2 but Criminal owns the LOCK
Criminal: Thead #2 demands resource #1 but Cop owns the LOCK
Criminal's friend's: Resource #2, the owner of the LOCK is Cop
Hostage of criminal: Resource #12, the owner of the LOCK is Criminal
Analysing the situation from an Operational System´s point of view, a correct conclusion is
Alternativas
- 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.
Consulte a resposta
Visitantes podem consultar seis questões. Com uma conta gratuita, consulte até 20 por dia; no plano pago, todas sem limite.
Fonte: TRE PR