Geeks Talk

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.

dead lock

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?...

Go Back   Geeks Talk > Software Development > OOPS
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

OOPS Object-Oriented Programming Concepts

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-13-2009
Junior Member
 
Join Date: Jul 2009
Location: Coimbatore
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
dharshinik_87 is on a distinguished road
dead lock

Is dead lock is simillar to race condition?
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-15-2009
Expert Member
 
Join Date: May 2009
Location: Bangalore
Posts: 983
Thanks: 155
Thanked 420 Times in 201 Posts
rijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nicerijus is just really nice
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.
Reply With Quote
The Following User Says Thank You to rijus For This Useful Post:
Reply

  Geeks Talk > Software Development > OOPS

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


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


All times are GMT -4. The time now is 08:07 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved