Explain how a critical section avoids race condition, Computer Engineering

Assignment Help:

Explain how a critical section avoids Race condition.

To prevent Race Condition, concurrent processes should be synchronized.

Data consistency needs that only one process must update the value of a data item at any time. It is ensured through the notion of a critical section. For data item d a critical section is a section of code, which can't be executed concurrently with itself or along with other critical sections for d. by considering a system of n processes as (P0, P1,..., Pn-1), all processes have a segment of code termed as a critical section, wherein the processes may be changing common variables and updating a table then writing a file, and so on. The significant feature of the system is that, while one process is executing into its critical section, no other process is to be permitted to execute into its critical section. Hence the execution of critical sections through the processes is equally exclusive in time.

repeat

                  Entry section

           critical section

              Exit section

               remainder section

until FALSE


Related Discussions:- Explain how a critical section avoids race condition

Creates a grid-matrix of cells, 1. Write the function makegrid. This functi...

1. Write the function makegrid. This function accepts a width and height and creates a grid/matrix of cells. The width gives the number of columns and the height the number of rows

Symmetric and asymmetric encryption algorithms, Compare and contrast symmet...

Compare and contrast symmetric & asymmetric encryption algorithms. Your response should contain a brief overview of the cryptographic basis for every type of algorithm, and a compa

What do you mean by prototype, Q. What do you mean by Prototype? A prot...

Q. What do you mean by Prototype? A prototyping approach lay emphasis on the construction model of a system. Designing and building a scaled-down though functional version of a

Combinational logic circuits, A circuit can be designed to perform manydiff...

A circuit can be designed to perform manydifferent functions e.g.a circuit has 3 inputs A, B and C and 3 outputs:Output X is logic level 1 (or 'high') if one or moreinputs are at l

Define the half duplex transmission, Define the Half Duplex Transmission ...

Define the Half Duplex Transmission A half-duplex channel can receive andsend, but not at the same time. It's like a one-lane bridge where two-way traffic should give way in

C++, find the minimum total number of shelves including the loading process...

find the minimum total number of shelves including the loading process

Define linear probing with respect to hashing technique, Define Linear Pro...

Define Linear Probing Linear Probing:  The easiest way to resolve a collision is to begin with the hash address and do a sequential search by the table for an empty location.

What is interaction modeling, What is interaction modeling? Interaction...

What is interaction modeling? Interaction model explains interactions within a system. The interaction model explains how objects interact to produce useful results. It is a ho

What are the process states, What are the Process states? By the course...

What are the Process states? By the courses of implementation, processes change state. Status of a process is express by its present activity. Dissimilar practical states of

Interfacing assembly language routines, By now you can write procedures bot...

By now you can write procedures both internal andexternal and pass parameters particularly through stack.Let's us use these concepts to see how assembly language can be interfaced

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