Câu hỏi phỏng vấn Concurrency
Câu hỏi

What is a Deadlock?

Câu trả lời

A lock occurs when multiple processes try to access the same resource at the same time. One process loses out and must wait for the other to finish.
A deadlock occurs when the waiting process is still holding on to another resource that the first needs before it can finish.

So, an example:
Resource A and resource B are used by process X and process Y

  • X starts to use A.
  • X and Y try to start using B
  • Y 'wins' and gets B first
  • now Y needs to use A
  • A is l...
junior

junior

Gợi ý câu hỏi phỏng vấn

junior

Explain the difference between Asynchronous and Parallel programming?

junior

What is a Mutex?

Bình luận

Chưa có bình luận nào

Chưa có bình luận nào