Clear_Text

> INCOMING TRANSMISSION...

> INITIATING SECURE UPLINK...

> CONNECTION TO AEVIUM CORE ESTABLISHED!

> BROADCASTING IN CLEAR_TEXT...

[TRANSMISSION 014: What the Work Costs]

Accepted work must stay in the account.

The previous Transmission bounded one computation. Several bounded computations can still claim the same finite allowance.

Our teaching model gives jobs an allowance of ten fixed-size blocks of temporary storage, drawn from a larger memory pool. One unit counts one block. Processor time and bookkeeping storage are outside this initial charge.

An admission accepts a request and records its reservation. It remains live while that reservation is outstanding in the account. Suppose six blocks are reserved and two jobs each request three. Each request fits the four apparently available. Together, they exceed the allowance.

A counter below ten is insufficient. It must still account for every reservation it represents.

I. What the Account Contains

Let \( B\ge \text{0} \) be the fixed integer allowance. Let \( L \) be the finite set of live admission identities. Each \( j\in L \) has a recorded nonnegative integer charge \( {w}_{j}\text{,} \) unchanged while live. An identity is never reassigned to another admission within the history considered.

Require the recorded total \( R \) to satisfy

\( R={\sum}_{j\in L}{w}_{j},\text{ 0}\le R\le B. \)

The sum adds every live charge. The equality specifies exact accounting; the inequalities enforce its ceiling and nonnegativity. Neither substitutes for the other.

Available reservation allowance is \( F=B-R\text{,} \) so \( R+F=B\text{.} \) This is derived availability in the account. Whether storage has physically become available requires a further argument.

A job reserving six blocks might currently use four. Its reservation still contributes six while that allowance remains outstanding. A momentary drop in use does not, by itself, reduce the accepted obligation against which other work is admitted.

Admission, refusal, and release are each one indivisible transition in this model.

II. What Each Transition Must Preserve

First follow the ten-block account through an ordinary sequence. “First” and “Second” identify separate admissions:

OperationLive reservations\[ R \]\[ F \]
Start emptyNone\[ \text{0} \]\[ \text{10} \]
Admit First for sixFirst: six\[ \text{6} \]\[ \text{4} \]
Admit Second for threeFirst: six; Second: three\[ \text{9} \]\[ \text{1} \]
Refuse another threeFirst: six; Second: three\[ \text{9} \]\[ \text{1} \]
Release SecondFirst: six\[ \text{6} \]\[ \text{4} \]
Repeat that releaseFirst: six\[ \text{6} \]\[ \text{4} \]

Each total comes from the entries beside it. In the nine-block rows, six belongs to First and three to Second. Refusal creates no reservation. Releasing Second restores only its three units of allowance; repetition cannot restore another three. First’s six remains charged throughout. We now prove preservation for every permitted sequence.

Initial state. Set \( L=\varnothing \) and \( R=\text{0.} \) The empty sum is zero, and \( B\ge \text{0,} \) so the invariant holds and \( F=B\text{.} \)

Admission. Assuming the invariant, admit a fresh identity \( j \) with nonnegative integer charge \( w \) only if \( w\le B-R\text{.} \) Record \( {w}_{j}=w\text{,} \) form \( {L}^{\text{'}}=L\cup \text{\{}j\text{\}}\text{,} \) and set \( {R}^{\text{'}}=R+w\text{.} \) Primes denote updated values. Freshness gives exactly one new summand:

\( {\sum}_{k\in {L}^{\text{'}}}{w}_{k}={\sum}_{k\in L}{w}_{k}+w=R+w={R}^{\text{'}}. \)

Since \( R,w\ge \text{0,} \) the new total is nonnegative. Adding \( R \) to the guard gives \( R+w\le B\text{.} \) Thus both bounds survive, and \( {F}^{\text{'}}=B-{R}^{\text{'}}=F-w\text{.} \)

Refusal. A request failing the admission conditions changes neither the live set nor its total, preserving the invariant.

Release. For \( j\in L\text{,} \) retrieve its recorded charge \( {w}_{j}\text{.} \) The request supplies an identity, not an amount to subtract. Form \( {L}^{\text{'}}=L\setminus \text{\{}j\text{\}}\text{.} \) Exact accounting gives

\( R={w}_{j}+{\sum}_{k\in {L}^{\text{'}}}{w}_{k}. \)

Nonnegative remaining charges imply \( {w}_{j}\le R\text{.} \) Setting \( {R}^{\text{'}}=R-{w}_{j} \) therefore gives

\( {R}^{\text{'}}={\sum}_{k\in {L}^{\text{'}}}{w}_{k},\text{ 0}\le {R}^{\text{'}}\le R\le B. \)

Also, \( {F}^{\text{'}}=B-{R}^{\text{'}}=F+{w}_{j}\le B\text{.} \) If the identity is absent, release changes nothing.

The initial case and preservation cases complete the induction: from any finite permitted history satisfying the invariant, every allowed next operation preserves it. Therefore every finite permitted history satisfies it. This is the invariant principle applied to these rules (Lehman et al., 2015, Section 5.4.3).

A zero-charge admission changes membership without changing \( R\text{;} \) its release reverses that membership. With \( B=\text{0,} \) only zero charges pass the capacity check.

III. A Release Belongs to One Admission

Let \( {\rho}_{j} \) mean release of identity \( j\text{,} \) and \( S \) denote the account state. Then

\( {\rho}_{j}\text{(}{\rho}_{j}\text{(}S\text{)}\text{)}={\rho}_{j}\text{(}S\text{)}. \)

Proof. If \( j \) is absent, both releases leave the account unchanged. If present, the first removes it and subtracts its charge; the second finds it absent and does nothing. Both cases establish the equality.

The last two table rows show this idempotence. Their retained accounts agree, although the first release may report success and its repetition may report that nothing remained.

Once a formerly live identity is removed, later releases cannot add it, refusals change nothing, and admissions cannot reuse it. Induction over intervening operations keeps it absent. Its charge can be removed at most once.

Reusing the identity would break that argument. A delayed release for the old admission could select a new reservation bearing the same name. The arithmetic could remain exact while releasing the wrong obligation.

Finite software must justify how it preserves admission identity. This proof supplies no unlimited source of identifiers.

IV. The Decision and the Reservation

Return to six reserved blocks and four available. Two three-block requests both pass if they inspect that same available allowance before either reserves it. Accepting both produces live charges totaling \( \text{6}+\text{3}+\text{3}=\text{12.} \) Alternatively, an overwritten counter update could leave \( R=\text{9} \) while the live charges still total twelve: the ceiling appears intact, but exact accounting has failed.

Under our rule, the first admission raises \( R \) to nine. The second sees one available unit and is refused. The decision and its reservation belong to the same abstract transition.

Concurrent operations support this reasoning when their behavior has a legal sequential ordering respecting operations completed before later ones began. Linearizability formalizes that requirement, treating each operation as taking effect between invocation and response (Herlihy & Wing, 1990). Separately atomic reads or additions do not establish the combined admission rule.

V. What Each Bound Covers

Reserved capacity. The inequality \( R\le B \) limits the sum of live charges. Other quantities need their own accounts.

Number of admissions. Suppose every live charge is at least a positive integer \( c\text{,} \) and let \( n \) count the members of \( L\text{.} \) If each admission reserves at least three of our ten blocks, four admissions would require at least twelve. The general argument adds these individual lower bounds:

\( nc\le {\sum}_{j\in L}{w}_{j}=R\le B. \)

Dividing by \( c>\text{0} \) gives \( n\le B/c\text{.} \) Because \( n \) is an integer,

\( n\le \text{⌊}{B}/{c}\text{⌋}. \)

This includes \( n=\text{0.} \) Without a positive minimum, any finite number of distinct zero-charge admissions leaves \( R=\text{0.} \) For every proposed count ceiling, a larger number preserves the charge invariant. That invariant alone therefore gives no count bound.

A separate ceiling can supply one. Choose an integer \( N\ge \text{0,} \) record \( n \) exactly, and require \( n<N \) alongside the capacity guard. Both checks and updates belong to the same transition.

Count proof. Initially \( n=\text{0} \) counts the empty set and satisfies \( n\le N\text{.} \) A fresh admission adds one member; \( {n}^{\text{'}}=n+\text{1}\le N \) follows from the guard. A live release removes one member; membership gives \( n\ge \text{1,} \) so \( \text{0}\le {n}^{\text{'}}=n-\text{1}\le N\text{.} \) Refusal and absent release change neither membership nor count. Induction preserves the exact count and its bounds.

Even a zero-charge admission consumes one of these places. If \( N=\text{2,} \) the table’s nine-block row has one block available but no place for a third record. Even a zero-block request must be refused. With \( N=\text{0,} \) none can enter. Thus \( B \) limits reserved blocks; \( N \) limits live records; \( n \) is their current number.

A zero block charge does not make its tracking record free. Any total-memory claim must cover record storage through charges or a separately justified bound. A count ceiling alone does not establish a maximum size for each record.

Actual usage. Let \( H\ge \text{0} \) be a fixed finite bound on baseline usage. Suppose all usage covered by the claim consists of that baseline and amounts \( {u}_{j} \) attributable to live admissions, with \( \text{0}\le {u}_{j}\le {w}_{j}\text{.} \) Then total usage \( U \) satisfies

\( U\le H+{\sum}_{j\in L}{u}_{j}\le H+{\sum}_{j\in L}{w}_{j}=H+R\le H+B. \)

Coverage gives the first inequality. Adding the individual usage bounds gives the second. Exact accounting and the reservation ceiling give the rest. Each step has its own stated justification.

To see why coverage matters, count only payload blocks and take \( H=\text{0.} \) Remove a six-block reservation while its job still holds all six blocks. Admit a fresh six-block reservation whose job also uses six. Now \( R=\text{6}\le \text{10,} \) but \( U=\text{12.} \) The old six blocks belong to no live entry, so the coverage inequality fails even though the account remains exact. The new job still obeys its own charge; the missing coverage belongs to the old job.

A request to stop work does not prove that storage has been relinquished. Anything still held needs continuing coverage.

Arithmetic range. Let \( M \) be the largest representable nonnegative integer, with \( B,N\le M \) and requested charges representable. Since \( \text{0}\le R\le B\text{,} \) the subtraction \( B-R \) fits. A successful guard proves \( R+w\le B\le M \) before addition. Release uses \( \text{0}\le {w}_{j}\le R\text{,} \) making \( R-{w}_{j} \) representable. Likewise, \( n<N \) proves \( n+\text{1}\le N\le M\text{,} \) and live membership proves \( n\ge \text{1,} \) making \( n-\text{1} \) representable. These counter updates need no wraparound. Other calculations require their own checks.

VI. What Remaining True Cannot Finish

The account can remain correct while one reservation stays held forever.

Choose \( B>\text{0} \) and \( N\ge \text{1.} \) Admit one reservation of charge \( B\text{,} \) then consider infinitely many further requests each charging \( B\text{.} \) Available allowance is zero, so every request is refused. The first reservation is never released. Exact accounting, both ceilings, and the prohibition on repeated subtraction all remain satisfied.

At-most-once release restricts effects; eventual release requires a future event. Herlihy and Wing (1990, p. 485) likewise distinguish linearizability’s safety guarantee from eventual progress. Completion and release require separate arguments.

Nor does reusable capacity bound everything admitted over time. From an empty account with \( N\ge \text{1,} \) choose \( \text{0}<w\le B\text{.} \) In this mathematical example, number the cycles by the positive integers, using each number as that cycle’s fresh admission identity. Admit and release charge \( w \) each cycle. Each cycle returns \( R \) and \( n \) to zero, permitting the next. For any nonnegative integer \( J\text{,} \) \( J \) cycles admit total charges \( Jw\text{,} \) while the live total never exceeds \( w\text{.} \) Given any cumulative ceiling \( T\ge \text{0,} \) choosing \( J=\text{⌊}T/w\text{⌋}+\text{1} \) gives \( Jw>T\text{.} \) A simultaneous allowance does not bound cumulative admissions.

These are mathematical models. Showing that a program implements their transitions and preserves their assumptions is another argument. That connection will be the subject of the next Transmission.

For The Everdark Accord, a capacity claim must name what it counts and establish what its records cover. A small total earns its meaning through that correspondence.

What is still held must still be counted.

--The Architect--

References

Herlihy, M. P., & Wing, J. M. (1990). Linearizability: A correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3), 463–492. https://doi.org/10.1145/78969.78972

Lehman, E., Leighton, F. T., & Meyer, A. R. (2015). Mathematics for computer science. Massachusetts Institute of Technology. https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-spring-2015/mit6_042js15_textbook.pdf

> END OF TRANSMISSION...CONNECTION CLOSED