Register now or log in to join your professional community.
first of all ,we see why and where we use locking and unlocking,
locking came into picture when we are dealing with threads(small part of the program
or light weight process),locking means taking control over the object and to ensure
consistency of shared data. In locking mode only one thread can work on that particular
object.locking also causes deadlock condition . Performance of application is slow.
In Non-locking multiple thread can access the object at the same time.
Performance is high as CPU is not idle.