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
Why is it called out of band protocol? A1) FTP uses port 20 and port 21; port 20 is used for data connection, whereas port 21 is used for control connection. FTP is known as out-of


Python allows single (''), double (") and triple ('''''' or """) quotes to indicate string literals, as long as the similar type of quote starts and ends the string. The triple quo

text graphics audio video

Manipulate the following Boolean expression in such a way so that it can be implemented using exclusive-OR and AND gates only. AB''CD'' + A ''BCD'' + AB''C''D + A''BC''D

QUESTION a) What is Time Division Multiplexing (TDM), illustrate your answer with a diagram b) Describe four types of RTCP messages c) i) What is silence compression in I

which one of the following is a valid identifier

Input devices of a digital computer: Input devices are used to read the instructions and data to be processed and output devices display the results obtained after executing t

Types of chat room: Java Chat rooms: The most common and popular chat scripts are based on java which is object oriented language. Java is freely available and comes with virt

Using only the digits 1-6 how many five digit numbers can be formed? How many of these have at least a 5? How many of them have either no 5 or no 6?