How to avoid race conditions with critical section?, Basic Computer Science


• The key to preventing problem involving shared storage is get some way to prohibit more than one process from reading and writing the shared data concurrently. That part of the program where the shared memory is used is called the Critical Section. To keep away from race conditions and flawed outcomes, one must identify codes in Critical Sections in each thread. The feature properties of the code that form a Critical Section are:
o Codes that position one or more variables in a “read-update-write” fashion while some of those variables is probably being changed by another thread.
o Codes that alter one or more variables that are possibly being mentioned in “read-update-write” fashion by another thread.
o Codes use a data structure while any division of it is possibly being altered by another thread.
o Codes alter any division of a data structure while it is possibly in use by an additional thread.

Here, the significant point is that when one process is executing shared adaptable data in its critical section, no further process is to be allowed to execute in its critical section. Therefore, the execution of critical sections by the processes is mutually exclusive in moment.
Posted Date: 5/2/2012 9:08:27 AM | Location : United States







Related Discussions:- How to avoid race conditions with critical section?, Assignment Help, Ask Question on How to avoid race conditions with critical section?, Get Answer, Expert's Help, How to avoid race conditions with critical section? Discussions

Write discussion on How to avoid race conditions with critical section?
Your posts are moderated
Related Questions
Question 1 With an example, illustrate the concept of extern variable Question 2 What is the difference between pointer variable and simple variable? Question 3 Give the

What constitutes ERP? ERP typically comprises a client server architecture, fourth generation language, RDBMS and graphical user interface in an open systems environment. It

There are many other techniques in which companies who manufacture microprocessors have attempted to get better the performance of their CPUs. Cache memory this is a small quantit

i am currently studying my computer science engineering 2nd yr. i am unable to select what specification should i take please help me

Hello - What is the turn around time for a 6 page website.

QUESTION a) Cryptography is a set of techniques and mathematical algorithms. Describe four important areas where cryptography must be applied b) What is the importance of us

Reflex agent-Artificial Intelligence If an agent decides and executes an action in response to a sensor input without consultation of its world, then it may be considered a ref

requirement analysis and specification for online voting

Proposal a) Disabling Interrupts (Hardware Solution) • Every process disables all interrupts just after entering in its critical section and re-enables all interrupts just previous

WHAT IS MULTIPLE CONTIGUOUS VARIABLE PARTITIONING