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
1. Write an algorithm and draw a flowchart to accept the names and gross salary of 5000 employees and to generate the net pay. If the gross salary is greater than N 50,000 declare

Please what is the different between computer science and information technology? Which of this require too much reading? Thanks

It's a common protocol or "language" computers use to "speak" to each other over the Web.

The CPU has four internal registers, each of 16 bits. The first four, AX, BX, CX, and DX are common use registers and can also be used as 8 bit registers, if used in such a way it

Ask qu The figure below shows a rooted tree, 756_Find the height.png 1.1. Find the height/level of the tree as shown above?estion #Minimum 100 words accepted#

EVOLUTION OF A COMPUTER: Although 'computer', as we understand it today, is relatively of recent innovation, its development rests on centuries' of research. This section pres

Spidering or Web crawling: Spider or Web crawler is a computer program that browses the web pages of WWW in a systematic, automated manner. Search Engines use spider for gett

1. The process abstraction is a popular way to organize concurrent programs, but it is not the only choice. An alternative to the process abstraction is to design a single-threaded

to do a assignment regarding IPC in linux

Question 1 What are the various skills needed for broadcasting and film? Question 2 What is a 2 dimensional animations and 3 dimensional animations? Question 3 Different