Click here to Skip to main content
15,891,375 members
Please Sign up or sign in to vote.
2.25/5 (4 votes)
See more:
Pls give me a solution...








Regards
Pratheesh
Posted

Write good code. Hard to know what else to say, given how brief your question is.
 
Share this answer
 
A good start is to examine your critical code path. When you need to lock resources, make sure you are locking them in the same order at all points.
Then, if you cannot exclusively lock ALL resources, you need to release all the resources you have locked, then try again.
Next, be careful not to get into a live lock situation. A good method is to have a locking queue. If a process cannot get it's items then it joins a queue, when it comes to the front of the queue it is triggered to go and then it is its turn to lock and go.

I recently found a great resource on this, here[^].
 
Share this answer
 
frist thank u
where is solution
i want see solutionand update for solution
ok
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900