Question

In: Computer Science

3. Be creative, but realistic: Describe an example (of your own creation) of a system that...

3. Be creative, but realistic: Describe an example (of your own creation) of a system that would be susceptible to a race condition, and what might happen to cause the race condition in your imagined system. Then explain what might be the effect of that race condition in your particular system. The goal in this last part is to imagine a real-world system and to describe it in a way that the marker can understand as well as showing how it could be affected by a race condition.

Solutions

Expert Solution

Race condition is a situation in which concurrently executing processes accessing the same shared data item may affect the consistency of the data item.Outcome of the execution depends the particular order in which the statements are executed. We can take an example of a food recipe that needs two cooks to prepare and the time to make the cake is two hours. The cake needs to be placed in a pan to get baked in an oven and a flavoured syrup has to be poured over the cake at the beginning and flip over to let it cook on the other side of the cake , after an hour the dish needs to be flipped over again and the same flavoured syrup is added on the same side , but this time no flipping is is done and kept as it is to cook for an hour again. Total time will be then 2 hours. It has been decided that two cooks will be doing the task of adding the flavoured syrup . Here the first cook does his task properly and flips the dish , but unfortunately the second Cook was not informed about it so he again pours the syrup and turns the cake again and let it cook.

Here the problem of race condition has occurred, as the same task has been done in the same time, i.e, at the beginning. Thus the recipe and the flavour has been added on both the sides of the cake.whereas it should have been added twice on the same side of the cake after an interval of an hour.

The effect in the case would be that the cake will not have it's expected taste and it would be undercooked as the flavour went on both the sides or it may have a odd taste as well.

To avoid the race condition the first cook after completing his task should have informed the second Cook that he have already done his task and next time the second Cook has to add the syrup. Here both the cook has shared the same process at the same time, here the process is the task of adding syrup.


Related Solutions

Draw by hand a 3 pass transmembrane protein of your own creation (not a known one)...
Draw by hand a 3 pass transmembrane protein of your own creation (not a known one) through a plasma membrane. In your drawing clearly draw and label: The plasma membrane and the extracellular and cytosolic side The C and N terminus All the regions where you expect to find higher proportions of polar amino acids All the regions where you expect to find higher proportions of nonpolar amino acids.
a) Describe, using a schematic/diagram of your own creation, how an electron microscope changes from low...
a) Describe, using a schematic/diagram of your own creation, how an electron microscope changes from low magnification to high magnification. b) Why is it preferable to image a conductive surface in an SEM? c) Is the conductivity of the sample as critical in a TEM as it is in an SEM? Why or why not?
Explain creative curriculum in one paragraphy using your own words ?
Explain creative curriculum in one paragraphy using your own words ?
Use a firm of your choice, either real or of your own creation aand write as...
Use a firm of your choice, either real or of your own creation aand write as from the perspective who has just been hired to conduct and audit of the firm. a) Using the firm you have chosen, outline a thorough outline for the audit that includes descriptions of particularly important issues to be dealt with along the way. b) Using the firm you are auditing, thoroughly outline the evidence you will gather. Explain the importance of each type and...
Use a firm of your choice, either real or of your own creation aand write as...
Use a firm of your choice, either real or of your own creation aand write as from the perspective who has just been hired to conduct and audit of the firm. explain each part at least in 200 words. a) Using the firm you have chosen, outline a thorough outline for the audit that includes descriptions of particularly important issues to be dealt with along the way. b) Using the firm you are auditing, thoroughly outline the evidence you will...
In your own words, do you think the media and movies perpetuate a realistic view of...
In your own words, do you think the media and movies perpetuate a realistic view of marriage or an unrealistic view? Do you think people truly know what marriage is all about before getting married or do you think they expect a fantasy?
12. a. (3) Define and give your own example of consumer surplus. b. (3) Define and...
12. a. (3) Define and give your own example of consumer surplus. b. (3) Define and give your own example of producer surplus. c.(3) Why do economist use consumer and producer surplus to measure the costs and benefits of trade and protectionism? 13. a. (3) What is Adam Smith’s invisible hand of the market? b. (3) What does this imply about international trade?
4. Describe the availability tendency in your own words, and give an example of how the...
4. Describe the availability tendency in your own words, and give an example of how the tendency could result in a lack of audit effectiveness. How can the tendency be mitigated? 5. Describe the confirmation tendency in your own words, and give an example of how the tendency could result in a lack of audit effectiveness. How can the tendency be mitigated? 6. Describe the overconfidence bias in your own words, and give an example of how the bias could...
a) In your own words or using an example, describe each condition and its relevance for...
a) In your own words or using an example, describe each condition and its relevance for the three conditions for profitable price discrimination (1. have market power, 2. be able to identify submarkets, and 3. be able to separate submarkets). b) Suppose a perfectly price-discriminating firm faces demand function: ? = 22 − ? And has cost function: ? = 25 + 4? + (1 /2) ?^2 Identify the quantity he sells, the price(s) he charges, and the profits he...
3. The preferred response will include an explanation in your own words, and a good example....
3. The preferred response will include an explanation in your own words, and a good example. From the point of view of an issuing corporation, please describe the primary advantages and disadvantages of issuing preferred stock.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT