Explain what can be done to prevent race condition

Assignment Help Operating System
Reference no: EM1371083

Race conditions are possible in many computer systems. Consider a banking system with two functions: deposit(amount) and withdraw(amount). These two functions are passed the amount that is to be deposited or withdrawn from a bank account. Assume a shared bank account exists between a husband and wife and concurrently the husband calls the withdraw() function and the wife calls deposit(). Describe how a race condition is possible and what might be done to prevent the race condition from occuring.

Reference no: EM1371083

Questions Cloud

Xplain how much you value your life : Suppose that you are indifferent in between se designations, save for differential risk of death, and illustrate what does your willingness to pay for these vacation tells you about Explain how much you value your life.
What is the average velocity of the water in the pipe : One liter of water is 41C is used to make iced tea. How much ice at 0 C must be added to lower the temperature of the tea to 17C? The specific heat of water is 1 cal/g C and latent heat of ice is 79.7 cal/g. Reply in units of g.
Compute the equivalent cost of owning and operating : Compute the equivalent cost of owning and operating if the discount rate is 5% per year and Calculate the equivalent cost of owning and operating if the discount rate is 15% per year?
Quality management philosophies : Determine the main differences between re-engineering and continuous Improvement as Quality Management Philosophies?
Explain what can be done to prevent race condition : Suppose shared bank account exists between husband and wife and concurrently husband calls withdraw() function and wife calls deposit(). Explain how race condition is possible and what might be done to prevent race condition from occuring.
Discuss why demand curve faced by a perfect competitor : Discuss why demand curve faced by a Perfect Competitor is assumed to be perfectly elastic and that of a Monopolist less elastic.
Illustrate what did classical economists assumes : Illustrate what did classical economists assume about flexibility of prices, wages and interest rates. Illustrate what did this assumption imply about self-correcting tendencies in an economy in recession. Illustrate what disagreements did Keynes ..
What is the kinetic energy of electron in electron volts : A jetliner, traveling northward, is landing with a speed of 65m/s. Once the jet touches down, it has 715 m of runway in which to reduce its speed to 6m/s
What net force is acting on the mass along the incline : A small steel ball bearing with a mass of 17g is on a short compressed spring. When aimed vertically and suddenly free, spring sends the bearing to a height of 1.33 m. compute the horizontal distance ball would travel if the same spring were aimed..

Reviews

Write a Review

Operating System Questions & Answers

  Marginal and average cost curves

n a competitive market place (pure competition) is it possible to continually sell your product at a price above the average cost of production.

  Operating system maps user-level threads to kernel

Suppose an operating system maps user-level threads to the kernel using the many-to-many model and the mapping is done through LWPs.

  Page fault with lru page replacement policy

Computer has 16 pages of virtual address space but only three physical pages frames. Initially physical memory is empty. Program references virtual pages in order 1,2,3,4,5,3,4,1,6,7,8,7,8,9,7,8,9,5,4,5,4,2 Which references a page fault with LRU ..

  What are some ways to integrate linux servers

What are some ways you could integrate Linux servers into a Windows network to share information? What would be the advantages and disadvantages?

  Analyse the different methods for collecting data

Analyse the different methods for collecting data Explain by taking examples 3 types of Sampling techniques.

  Page table entries are needed for two-level paging

Assume that word 0 is part of a hole and that the highest word in memory contains valid tries are needed in the page table if traditional(one-level) paging is used? how many page table entries are needed for two-level paging, with 10 bits in ea..

  Write a multi-threaded program

Write a multi-threaded program to solve producer and consumer problem

  Explain how a race condition is possible

the wife calls deposit (). Describe how a race condition is possible and what might be done to prevent the race condition from occurring.

  Construct resource allocation graph with processers

Construct a resource allocation graph with the following processers and resources, the system consists of four processers P1, P2, P3, and P4 and five resources R1, R2, R3, R4, and R5.

  Implementation of algorithms for process management

The Shortest Job Next (SJN) algorithm queues processes in a way that the ones that use the shortest CPU cycle will be selected for running rst.

  What is life cycle costing

What is Life Cycle Costing. Describe briefly the methodology for Life Cycle Costing. What are the criteria to consider when a procurement officer is faced with the decision of procuring a used equipment instead of a new one.

  Describe three solutions to critical section problem

Describe three solutions to critical section problem Explain the different methods used to handle deadlocks Distinguish between "No preemption" and "circular wait" in deadlocks prevention

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