7. What are the necessary conditions for a deadlock to occur in a system?