In a multi-threaded environment, which of the following is true about thread synchronization?

In a multi-threaded environment, which of the following is true about thread synchronization?

ملٹی تھریڈ والے ماحول میں، تھریڈ سنکرونائزیشن کے بارے میں درج ذیل میں سے کون سا سچ ہے؟
Explanation
  • Synchronization ensures that threads access shared resources safely, avoiding conflicts like race conditions.
  • Tools like semaphores and mutexes are used to control thread access to critical sections.