Grade 11 · lesson 3 of 4

Detect a Lost Update in a Concurrent Model

Trace each read and write and compare the final value with the intended combined operation.

About 22 minutes, plus any extended practice

Download the grade pack

Supplied materials

  • Paper and pencil; answers may also be spoken or typed.
  • All cases, labels, numbers and rules are supplied on this page. No real account, private information or purchase is needed.

Learn the idea

Concurrent requests can read the same earlier value and overwrite one another’s changes. In the supplied model two increments both read count 5 and each writes 6, so the final count 6 misses one increment. Atomic updates or an appropriate concurrency policy can protect the intended result.

Trace each read and write and compare the final value with the intended combined operation. Two individually valid requests can still conflict when they share state.

Use this supplied case: Atomic policy records final 7. Two intended increments start from 5. Classify the final evidence. The task is to connect the given information to the computing idea. Write a short evidence trail so another learner can reproduce your choice. The simplified case describes the stated model, not every real system.

  1. Represent the supplied worked case with a labeled drawing, table or short trace.
  2. Trace each read and write and compare the final value with the intended combined operation.
  3. Explain why the worked answer fits and why one alternative does not.
  4. Try the new check and practice cases; revisit the stated rule if your evidence does not match.
Worked example

See the method in action

In a fresh trace, both requests read count 8. Each computes 8+1=9 and writes 9, so the later write leaves 9 although two increments were intended. Serial processing would produce 8→9→10; a correctly implemented atomic increment preserves the same two changes. The final count, not only successful responses, distinguishes the outcomes. This model supplies the event order; real concurrent behavior would require implementation evidence.

Your turn

Check your reasoning

Your answer is temporary and is not saved to an account. Download your current answer before leaving or reloading. Written work on paper or in another app stays in your own file.

Helpful tips
  • Trace each read and write and compare the final value with the intended combined operation.
  • Two individually valid requests can still conflict when they share state.
Both requests read 5 then each writes 6. Two intended increments start from 5. Classify the final evidence.

Feedback appears here after you check. This is practice, not a graded school assessment.

See the answer and explanation

Lost update

Both requests read the original count 5. Each calculates 5+1=6 and writes 6. The later write leaves 6 even though two increments were intended. Serial processing instead gives 5→6→7; a correctly implemented atomic increment also preserves both increments. Thus a final count of 7 retains both changes, while two read-5/write-6 requests demonstrate a lost update. A successful response alone does not establish that both intended state changes survived. The requested case is: Both requests read 5 then each writes 6. Two intended increments start from 5. Classify the final evidence. Its answer is Lost update.

Take it further

Two requests read 8 and both write 9 while intending two increments. Expected: lost update; correct combined count 10 under a suitable atomic/serialized policy.

Nothing here is saved to an account or sent to a teacher. The answer download includes your current choice and any checked feedback. It does not include choices from the separate More practice section. Download that section separately.

More practice: try new cases

Choose an answer for each problem. Explain your method on paper, then use the feedback to decide what to revisit.

More practice: try new cases
1. Both requests are rejected before any write. Two intended increments start from 5. Classify the final evidence.
Need a hint?
  • Trace each read and write and compare the final value with the intended combined operation.
  • Two individually valid requests can still conflict when they share state.
2. No final-state observation is supplied. Two intended increments start from 5. Classify the final evidence.
Need a hint?
  • Trace each read and write and compare the final value with the intended combined operation.
  • Two individually valid requests can still conflict when they share state.
3. Serialized successful increments produce 7. Two intended increments start from 5. Classify the final evidence.
Need a hint?
  • Trace each read and write and compare the final value with the intended combined operation.
  • Two individually valid requests can still conflict when they share state.

Your choices are temporary. Feedback appears after you check all the answers.

Nothing here is saved to an account or sent to a teacher. Keep your own notes or download them before leaving. The score describes these questions; it does not certify subject mastery.

Check the subject sources

These LifeStarter passages, scenarios and exercises are authored for this Academy with AI assistance and review. External resources keep their publishers’ terms. A grade label suggests a starting level; it does not establish alignment with your school’s complete requirements.