Lock Variable Synchronization Mechanism

AddedThis section is to add new process or to visualize as such like the processes are coming for the shared variable.

EntryProcesses queued here if Critical Section is already occupied by some process to avoid access to shared Resources.

CSThe critical section is a code segment where the shared variables can be accessed.

ExitThis queue is to show the record of the completed processes.

Lock Variable :Lock variable lock is used here, Two values of lock can be possible, either 0 or 1. Lock value 0 means that the critical section is vacant while the lock value 1 means that it is occupied. It is a way to provide simplest Synchronization Mechanism with busy waiting.
Critical Section: It will show currently which process is being executed.
Completed Processes: Here completed processes will be displayed.