answersLogoWhite

0

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.

User Avatar

Wiki User

12y ago

What else can I help you with?

Continue Learning about Engineering

The gross head in turbine installation is difference of level between?

it is difference between the water level from head race and tail race


What is race around condition?

The "Race Around Condition" occurs when J+K=1 i.e. When the FF is in the toggle mode.the race around condition in JK latch can be avoided by:a) Using the edge triggered JK flip flop.b) Using the master slave JK flip flop.


How can you see a race condition in the hardware?

A race condition is a situation where the input setup and hold times for a circuit are not met. This results in uncertainty as to the final output. An example might be turning off the bus drivers using the same signal that you expect to latch the data with. You could see this with an oscilloscope or a waveform analyzer. You can also find it analytically, by studying the design.


What is race condition in OS?

A race condition or race hazard is a flaw in a system or process whereby the output and/or result of the process is unexpectedly and critically dependent on the sequence or timing of other events. The term originates with the idea of two signals racing each other to influence the output first. Race conditions can occur in electronics systems, especially logic circuits, and in computer software, especially multithreaded or distributed programs.


Describe two kernel data structures in which race conditions are possible?

A race condition can occur where a resource that was being waited upon by two data structures/processes is released and both processes try to access it simultaneously. It can also happen where the processor has to assign a unique process ID to two processes that have created at the same time.

Related Questions

The gross head in turbine installation is difference of level between?

it is difference between the water level from head race and tail race


What is the difference between toggle condition and race around condition?

A race condition is an undesirable situation that occurs when a device or system attempts to perform two or more operations at the same time, but because of the nature of the device or system, the operations must be done in the proper sequence in order to be done correctly.


What is the difference between racism and white supremacy?

There is no difference, truly. To think the white race is the supreme race is, in itself, racist.


What the difference between Africans and Dominicans people race?

Their Language


What is the length difference between 1500m steeplechase and 1500m race?

0m


What is the difference between rays and race?

rays means the sun's rays which fall on the earth. race means the race's which we play like running.


What is difference between race and culture?

culture would be where you come form and race would be the colour of your skin. Hope this helps :)


What is the difference between race car and city car?

A race car moves significantly faster than a city car.


What is the difference between a black man and a Mexican man?

Race vs. nationality. You are asking something like 'what is the difference between a white man and an English man'.


Is discrimination based on race?

Discrimination is the difference between any matters, not necessarily races.


What is the difference between africa and philippines?

People, race, geography, culture, religion, everything!


What is the difference between Arabic and Arab?

Arabic is the language or culture. Arab is a member of the Arabian race.