Which of the following can prevent a deadlock situation in multithreaded programming?

Last Updated :
Discuss
Comments

Which of the following can prevent a deadlock situation in multithreaded programming?

Allowing only one thread to execute at a time

Using lock ordering to acquire resources

Synchronizing all threads in the program

None of the above

Share your thoughts in the comments