Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the difference between locking and Non-locking in Programming languages ?

user-image
Question added by Mohamed Hedar , Digital Ads Manager , Growl Media
Date Posted: 2015/02/12
Mohd shahnawaz khan
by Mohd shahnawaz khan , Associate Project , Cognizant Technology Solution

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.

More Questions Like This