- Process or thread synchronization is a mechanism that deals with the synchronization of processes or threads, that is controlling the execution of one process or thread by another process or thread.
- It controls the execution of processes or threads in a such way that no two processes or threads can have access to the same shared data or resources concurrently to ensure that consistent results are produced.
- Threads should be synchronized to avoid critical resource use conflicts.
- It is a solution to critical section problem or a race condition problem.
Few of the synchronization technique used by the linux kernel are:
- Mutex
- Semaphore
- Spin locks
- Condition variables
Need of Synchronization:
- When multiple processes or threads execute concurrently sharing some system resources.
- To avoid any loss or inconsistent result.
Problem without synchronization:
Relevant Posts:
- Critical Section
- Race Condition
- Mutual Exclusion(Mutex)
- Semaphore
- Mutex Vs Semaphore
- Spin Lock
- Spin Lock Vs Mutex
- Condition Variables
Categories: Operating system (OS)
Leave a Reply