Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is race condition ?? (Threading concept) TCS 2 sept10

Answer Posted / mkjhamca05

This example shows a trivial software race condition. A
software race condition occurs when the execution of a
program is affected by the order and timing of a threads
execution. Most software race conditions can be alleviated
by using synchronization variables to control the threads'
timing and access of shared resources. If a program depends
on order of execution, then threading that program may not
be a good solution, because the order in which threads
execute is non deterministic.

In the example, thr_continue() and thr_suspend() calls
continue and suspend a given thread, respectively. Although
both of these calls are valid, use caution when implementing
them. It is very hard to determine where a thread is in its
execution. Because of this, you may not be able to tell
where the thread will suspend when the call to thr_suspend()
is made. This behavior can cause problems in threaded code
if not used properly.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are keywords in programming?

1014


What is lifetime variable?

964


What is a literal coding?

1026


Can we declare an interface as final?

1067


If an object is garbage collected, can it become reachable again?

1010


What is java beans?

1004


What does provide mean construction?

1105


What is the difference between variable declaration and variable initialization?

1036


How variables are stored in memory?

1004


What is the public field modifier?

1028


What is a parameter example?

981


Can we use a default constructor of a class even if an explicit constructor is defined?

1106


How many bits is a double?

1019


What is complexity and its types?

1033


How do you check if a string is lexicographically in java?

959