Features of Turn Variable
- Mutual exclusion: Mutual exclusion does not allow more than one process to access the same shared resource at the same time. Turn variable ensures mutual exclusion property.
- Progress: The turn variable does not guarantee progress. It follows the alteration approach strictly.
- Portability: The turn variable is implemented in user mode and does not require any kind of special instruction from the operating system. Therefore it provides portability.
- Bounded waiting: Each process gets the chance, once a previous process is executed the next process gets the chance therefore turn variable ensures bounded waiting.
- Deadlock: The turn variable is free from deadlock. Only one process is in a critical section at a time. Once the turn value is updated the next process goes into the critical section.
Turn Variable in Operating System
The turn variable is defined as a synchronization mechanism that is implemented in the user mode. The turn variable is also known as the Strict Alternation Approach. It is a synchronization mechanism that is implemented for synchronizing two processes. For synchronization, it makes use of a variable known as the turn variable. This approach is used only when working with two processes.
Contact Us