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
When purchasing a database program, you must have a clear idea of what you need it for. Ask yourself the following questions. (1) Will it perform all (he operations necessary f

In this assignment, you should create a class called ToDoMenu which has a main method that contains the code that implements a command-line menu for managing a collection of ToDoIt

Question 1 What is an operating system? Explain its functions Question 2 Discuss round-robin scheduling Question 3 Discuss on segmentation Question 4 What are the s

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

Consider the state transition diagram of Figure 3.9b. Suppose that it is time for the OS to dispatch a process and that there are processes in both the Ready state and the Ready/Su

Consider the one-time pad encryption scheme to encrypt a 1-bit message m, and assume m is chosen with uniform distribution from message space M={0,1}. Let E1 be the event "message

MAGNETIC CORE MEMORY: This type of memory is used extensively in airborne digital systems, although integrated circuits are being developed with most modern aircraft systems.

SYMBOLS CHART Every one of the parts on code line in assembler is known as token, for instance on the code line: MOV AX, Var We comprise three tokens, the MOV instruction, the AX o

In assembly language code lines have two fractions, the earliest one is the name of the instruction which is to be executed, and the next one are the parameters of the command. For