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

  • AThread synchronization is not necessary as threads do not share resources
  • BSynchronization is handled automatically by the operating system
  • CThread synchronization used semaphores and mutexes to prevent race condition
  • DNone of these
Show answerHide answer

Correct answer C

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.