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

What is a disk drive, What is a disk drive? The electro mechanical mech...

What is a disk drive? The electro mechanical mechanism that spins the disk and moves the read/write heads known as disk drive.

What are the different database integrities, What are the different databas...

What are the different database integrities? Semantic Integrity. Relational Integrity. Primary Key Integrity. Value Set Integrity. Foreign Key integrity and

Explain bottom-up parsing techniques, Explain Bottom-up Parsing Techniques ...

Explain Bottom-up Parsing Techniques A parser can begin with the input and attempt to rewrite it to the start symbol. Instinctively, the parser attempts to locate the most bas

Explain clearly the difference between j-cuts and l-cuts, Question: (a)...

Question: (a) Explain clearly the difference between J-cuts and L-Cuts. (b) What is the function of the rate stretch tool? (c) What's the difference between an Image Matt

Direct isp service through leased line, The most expensive method of access...

The most expensive method of accessing Internet is to use leased lines which connect directly to the ISP. This will increase access rate to anywhere between 64 K and 1.5 Mbps, rely

What happens if a function module runs in an update task, What happens if a...

What happens if a function module runs in an update task? The system performs the module processing asynchronously.  Instead of carrying out the call immediately, the system w

Example of unification, Example of Unification: Let now here, assume i...

Example of Unification: Let now here, assume instead that we had these two sentences as:  knows(john,X) → hates(john, X)  knows(jack, mary)  Thus here the predicate n

SERVER, How to configure TSM server

How to configure TSM server

Define far and near procedures, Q. Define Far and Near Procedures? Proc...

Q. Define Far and Near Procedures? Procedure offers the primary means of breaking the code in a program into modules. Procedures have one maindrawbackwhich is they need extra c

Explain programmer visible registers, Q. Explain Programmer Visible Registe...

Q. Explain Programmer Visible Registers? These registers can be accessed employing machine language. In general we encounter four kinds of programmer visible registers.

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