Shared variable programme structures
In this section, we talk about some more concepts related to the shared programme.
Concept of Lock
Locks are used for protected access of data in a shared variable system.
There are various types of locks:
1) Binary Locks: These locks are used globally between multiple processes.
2) Deckkers Locks: These locks are based on distributed requests, to make sure mutual exclusion without unnecessary waiting.