Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on dead lock within the OOPS forums, part of the Software Development category; Is dead lock is simillar to race condition?...
|
|||||||
|
|||
|
Re: dead lock
Hi,
Race Conditions A race condition occurs when two threads access a shared variable at the same time. The first thread reads the variable, and the second thread reads the same value from the variable. Then the first thread and second thread perform their operations on the value, and they race to see which thread can write the value last to the shared variable. The value of the thread that writes its value last is preserved, because the thread is writing over the value that the previous thread wrote. Deadlocks A deadlock occurs when two threads each lock a different variable at the same time and then try to lock the variable that the other thread already locked. As a result, each thread stops executing and waits for the other thread to release the variable. Because each thread is holding the variable that the other thread wants, nothing occurs, and the threads remain deadlocked. I think the description is enough to clear u r doubt.. If any query let me know.... Thanks & Regards, Riju. |
| The Following User Says Thank You to rijus For This Useful Post: | ||
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Pirates of the caribean-Dead man's chest | ssuvi | Brainteasers | 0 | 04-11-2009 08:48 AM |
| Dead lock & Lock | msvkrishna | Oracle | 6 | 03-30-2009 08:26 AM |
| Lock Table in Sql Server2000 | mahesh9920 | SQL Server | 7 | 11-27-2007 06:02 AM |
| How to lock a user in NIS domain? | Geek_Guest | Sun Certification | 1 | 07-16-2007 01:17 AM |
| Lock in Oracle Tables | sripri | Oracle | 3 | 12-19-2006 03:35 PM |