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?

Magnetic media, what are the five precautions to be observed when handling ...

what are the five precautions to be observed when handling magnetic media?

Explain the working of bus connection, Question 1 Explain the working of B...

Question 1 Explain the working of Bus connection Question 2 Write a note on: Robotics and Voice Recognition Question 3 Describe the construction of CD-ROM Question 4

Assembly language, Questions 1) Polynomial Integrals Problem: Write an X86-...

Questions 1) Polynomial Integrals Problem: Write an X86-series assembly language program that calculates and prints out (in a nice form) the indefinite integral of a simple polynom

Long term goal of artificial intelligence, Long term goal of artificial int...

Long term goal of artificial intelligence: This is not to be complex with the applications of AI programs to other sciences, discussed later. Rather, it is just pointing out th

Give birth to new life forms, Give birth to new life forms A research ...

Give birth to new life forms A research of Artificial Life will definitely throw light on what it means for a complex application to be 'alive'. Moreover, ALife researchers th

Meaning of primary data, Problem 1 Research designs have a critical and...

Problem 1 Research designs have a critical and directive role to play in the research process. Explain the meaning of research design. Describe the various types of research de

Computer system architecture, 1. Suppose that the meaning of the BUN instru...

1. Suppose that the meaning of the BUN instruction of the Basic Computer is changed to implement the relative addressing mode, i.e PC a) Write an optimal operation sequence to im

Heuristic search strategies-artificial intelligence, Heuristic Search Strat...

Heuristic Search Strategies-Artificial intelligence In general speaking, a heuristic search is one which utilizes a rule of thumb to improve an agent's performance in solving p

What do you mean by geo stationary orbit, Question 1 . Explain (a) Scatter ...

Question 1 . Explain (a) Scatter loss                                (b) Aperture medium coupling loss Question 2 . What do you mean by Geo stationary orbit? Question

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