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

Assignment Help:

• 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.

Related Discussions:- How to avoid race conditions with critical section?

Command processor and user interface, Command Processor and User Interface:...

Command Processor and User Interface: To the user, the most important and visible services provided by the OS is the user interface and the capabilities that it provides to ex

Why assembly language is good?, Because it is enormously low level, assembl...

Because it is enormously low level, assembly language can be optimized enormously well. Therefore assembly language is used where the extreme performance is needed for applications

Transaction-based model, Transaction-based model: Here,  the pricing i...

Transaction-based model: Here,  the pricing is based on providing a committed business service, for ex, processing payroll for a global company as part of HR offering and this

Write a note on modems, Question 1 Write a note on modems Question ...

Question 1 Write a note on modems Question 2 What are the Safe Chatting Rules Question 3 Explain three basic kinds of hypertext links Question 4 Write a no

Variable - concept of programming language, Variable - Concept of programmi...

Variable - Concept of programming language: Variable: As referencing memory by its physical address is very tedious, variable names are used. A variable is a symbolic name giv

Define internet and explain its working, Question 1 Define Internet and ex...

Question 1 Define Internet and explain its working Question 2 Explain page format specifiers and page content specifiers of XSL-FO Question 3 Write a note on HTML

Flow decomposition technique to list the cycles, QUESTION (a) Consider ...

QUESTION (a) Consider the graph below, use the Flow Decomposition technique to list the cycles and paths produced.                                                (b) Pr

Algorithms and flowcharts, 1. Write an algorithm and draw a flowchart to ac...

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

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd