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

Answers were Sorted based on User's Feedback



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

Answer / 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

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

Answer / atasi

threads can try to update same data structure at same time,one thread can wrote one part,other tthread ca wrote another part,then all data struture garbles,when new thraed ca want to access it ,it will be crashed

Is This Answer Correct ?    0 Yes 0 No

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

Answer / suj

Race conditions
: Threads can try to update the same data structure at the same time.
The result can be partly what one thread wrote and partly what the other thread wrote.
This garbles the data structure, typically causing the next thread that tries to use it to
crash.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

what is platform independence in java?

5 Answers   CSC, HSBC,


Explain Method Overloading in Java.

1 Answers  


Is list ordered in java?

0 Answers  


What exceptions occur during serialization?

0 Answers  


explain what is transient variable in java?

0 Answers  


How does predicate work in java?

0 Answers  


Relationship between an event-listener interface and an event-adapter class?

1 Answers  


What is the synchronized method modifier?

0 Answers  


How to change the priority of thread or how to set the priority of thread?

0 Answers  


How do singleton patterns work?

0 Answers  


what is difference between Exception and Error?

36 Answers  


What is methodological theory?

0 Answers  


Categories