ArticleslgStudy

computer science

Thomas write rule

Thomas write rule is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Thomas write rule rather than just read about it. In short: In computer science, particularly the field of databases, the Thomas write rule is a rule in timestamp-based concurrency control. It can be summarized as ignore outdated writes.

Key takeaways

  • Thomas write rule belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Thomas write rule to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Thomas write rule from memory before moving on to harder problems.

Reference excerpt

In computer science, particularly the field of databases, the Thomas write rule is a rule in timestamp-based concurrency control. It can be summarized as ignore outdated writes. It states that, if a more recent transaction has already written the value of an object, then a less recent transaction does not need to perform its write since the more recent one will eventually overwrite it. The Thomas write rule is applied in situations where a predefined logical order is assigned to transactions when they start. For example, a transaction might be assigned a monotonically increasing timestamp when it is created. The rule prevents changes in the order in which the transactions are executed from creating different outputs: The outputs will always be consistent with the predefined logical order. For example, consider a database with 3 variables (A, B, C), and two atomic operations C := A (T1), and C := B (T2). Each transaction involves a read (A or B), and a write (C). The only conflict between these transactions is the write on C. The following is one possible schedule for the operations of these transactions:

[T1T2Read(A)Read(B)Write(C)Write(C)CommitCommit]⟺[T1T2Read(A)Read(B)Write(C)CommitCommit] If (when the transactions are created) T1 is assigned a timestamp that precedes T2 (i.e., according to the logical order, T1 comes first), then only T2's write should be visible. If, however, T1's write is executed after T2's write, then we need a way to detect this and discard the write. One practical approach to this is to label each value with a write timestamp (WTS) that indicates the timestamp of the last transaction to modify the value. Enforcing the Thomas write rule only requires checking to see if the write timestamp of the object is greater than the time stamp of the transaction performing a write. If so, the write is discarded In the example above, if we call TS(T) the timestamp of transaction T, and WTS(O) the write timestamp of object O, then T2's write sets WTS(C) to TS(T2). When T1 tries to write C, it sees that TS(T1) < WTS(C), and discards the write. If a third transaction T3 (with TS(T3) > TS(T2)) were to then write to C, it would get TS(T3) > WTS(C), and the write would be allowed.

References Robert H. Thomas (1979). "A majority consensus approach to concurrency control for multiple copy databases". ACM Transactions on Database Systems. 4 (2): 180–209. doi:10.1145/320071.320076. ©

Worked examples

Example 1 — a first encounter with Thomas write rule

Start with the simplest possible case. Write down what Thomas write rule claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Thomas write rule before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Thomas write rule ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Thomas write rule

In research
Thomas write rule appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Thomas write rule in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Thomas write rule is common in secondary-school and first-year university syllabi. It links to neighbouring topics Computer science stubs, Transaction processing, so understanding it makes those chapters shorter.
In everyday life
Look for Thomas write rule outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Thomas write rule” →

How to study Thomas write rule in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Thomas write rule means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Thomas write rule out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Thomas write rule in simple terms?

In computer science, particularly the field of databases, the Thomas write rule is a rule in timestamp-based concurrency control. It can be summarized as ignore outdated writes.

Why does Thomas write rule matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Thomas write rule?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Thomas write rule.

Tags

  • Computer science stubs
  • Transaction processing

Keep exploring