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?

Explain the tcp/ip reference model with diagram, Question 1 Define the fol...

Question 1 Define the following terms                                   1) Analog Signals and Digital Signals 2) Composite signals Question 2 Define the following terms

Difference between an html and an xhtml page, QUESTION (a) Define four ...

QUESTION (a) Define four special target names use with the TARGET attribute (b) Explain the main difference between an HTML and an XHTML page (c) Give two merits and two

Definition of ALU , The ALU, or the arithmetic and logic unit is the part...

The ALU, or the arithmetic and logic unit is the part of the processor that is occupied with executing operations of an arithmetic or logical nature. It works in conjunction by mea

Environment for intelligent agents-artificial intelligence, Environments ...

Environments We have seen that intelligent agents might take into account certain information when   choosing   a   rational   action, by  including information from its sensor

Computer architecture, Subject Name CIT2193 COMPUTER ARCHITECTURE Topic AS...

Subject Name CIT2193 COMPUTER ARCHITECTURE Topic ASSIGNMENT Due Date 16 March 2012 Name : ……….…………………….……………….. Lecturer : ................................. Intake : ………………….

Execute a command in operating system, Execute a command in operating syste...

Execute a command in operating system: In order to execute a command OS does the following steps:   It accepts a command from a user through mouse clicks or from t

Chat, Chat: The word chat in English language means - casual conversat...

Chat: The word chat in English language means - casual conversation. On Internet it means the same, except that you need to use text and your keyboard skills are tested. Earli

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