# Block adjacency and request boundaries This is a synthetic arithmetic illustration for the existing filesystem-aging analysis and dynamic-layout-score glossary entry. It is not a benchmark, a blktrace parser, a measurement of seeks, or a replication of a paper's tool. ## Evidence Conway et al., File System Aging, arXiv:2401.08858v1 (2024), section 3, defines its dynamic score in terms of requested blocks, including cross-file and metadata access, and identifies the loss of gap-size information. https://arxiv.org/pdf/2401.08858v1 Smith and Seltzer, File System Aging: Increasing the Relevance of File System Benchmarks (1997), section 3.4, excludes the first block in a file from its static score and leaves the score undefined for one-block files. https://www.seltzer.com/assets/publications/File-System-Aging.htm Linux v6.12, Documentation/ABI/stable/sysfs-block, queue/nomerges describes merging contiguous I/O. This motivates documenting the request representation; it does not establish which event stream a historical experiment used. https://github.com/torvalds/linux/blob/v6.12/Documentation/ABI/stable/sysfs-block All three were reviewed on 2026-11-25. The 2024 manuscript extends earlier work, not an independent hardware population. No performance result is pooled here. ## Explicit convention Each input pair is [start, blockCount], in one fixed-size logical-block unit, for one device and operation class, in a caller-supplied observation order. A request traverses its range forward. Repeated/overlapping requests remain. Do not sort, deduplicate, mix devices, or count multiple events for the same operation as if each were a distinct access. Let N count requested blocks including repetitions. A counts adjacent pairs whose next block address is exactly the previous address plus one. Report A/(N-1), or null when N < 2. This first-block convention is explicit for this illustration; the dynamic-score prose alone does not specify every detail of the original tracing implementation. No numerical identity with its scores is claimed. Internal adjacency in a request of length L contributes L-1. A joining request boundary contributes one. Thus splitting a request without changing block order leaves A, N and run lengths unchanged. A boundary-only fraction has a different denominator and can change. Signed gaps are next start minus previous exclusive end; they are address distances, not seek times or a count of damaged blocks. The algorithm visits each range once and never enumerates its blocks. It retains one length per run and one gap per discontiguous boundary: O(requests) storage. Pooled-window counting uses the same one-pass accumulator without retaining runs or gaps: a fixed number of counters independent of request count. Caller-owned input storage and the growing bit widths of exact integers are not constant. BigInt arithmetic is exact; its bit cost grows with integer size. Fractions and counts serialize as decimal strings, not rounded floating-point probabilities. ## Replay Requires Node.js with built-in node:test support; no dependencies. Run: node --test model.test.mjs Generate examples: node --input-type=module -e 'import {exampleDocument} from "./model.mjs"; console.log(JSON.stringify(exampleDocument(),null,2))' Four eight-block examples all give 6/7. Splitting the first request changes the boundary-only fraction from 0/1 to 1/2. Equal block adjacency can also hide run lengths 4+4 versus 7+1, or gaps 6 versus 996. These equalities predict no speed. Tests compare 54,240 small request streams with explicit block enumeration, exercise splitting, direction, repeated accesses, undefined cases, invalid inputs and huge ranges. No randomness, device access, timing measurement or external data. ## Observation windows are not request packaging The additive `poolWindows(windows)` function sums adjacent-pair counts and within-window denominators. For window i with N_i requested blocks, the denominator is max(N_i - 1, 0). It never infers a cross-window transition. Keep the device, operation class, tracing layer, order and block unit comparable. A device-sector address must not silently be interpreted as a filesystem-block address. The caller must resolve these units before supplying ranges. Two constructed windows, [[0,1],[10,1]] and [[11,9]], have ratios 0/1 and 8/8. Pooling observed within-window pairs gives 8/9. Their equal-window average is 1/2: a legitimate different estimand, not that pooled pair fraction. If they are instead known to be consecutive portions of a continuous stream, including the observed joining pair gives 9/10. Moving the second window to [[20,9]] leaves the within-window result 8/9 but gives 8/10 for a continuous stream. Missing transitions are unknown, not observed failures of adjacency. Splitting I/O requests within a window preserves the block sequence. Splitting the observation into separate windows changes which pairs are included: [[0,4],[10,4]] scores 6/7 continuously but 6/6 when the two requests are separate windows. Report the boundary policy, numerator and denominator together. Empty/singleton windows contribute zero pairs; their counts remain in the output, and zero total denominator yields null rather than a zero score. No inference about unobserved intervals or whole-workload locality follows. These are derivations of this illustration's declared forward-adjacency convention, not empirical results, confidence intervals, or a reconstruction of Conway's tool. Smith/Seltzer's first-block exclusion concerns files; it is not the authority for this window policy. The arithmetic does not require statistical independence between windows. Generate the additive artifact with windowDocument(); the original four-row examples.json and its schema remain unchanged. Six additional model tests include an independent expanded-block oracle over 1,849 pairs of windows. ## Counting resolution is part of the metric The byte ranges [0,4096] and [8192,4096] request the same 8192 bytes in both rows of units.json. Counted in 4096-byte units, they give 0/1 adjacency; counted in 512-byte units, they give 14/15. There are two forward runs and one 4096-byte gap in both cases. No request, address, device or layout changed. For a nonempty stream of N blocks in R forward runs, A=N-R. Subdivide every block into k equal units, preserving ordered byte ranges and boundaries: the ratio becomes (k*N-R)/(k*N-1), when the denominator is positive. R stays fixed. For N=1,k=1 the score remains null. This proof is specific to the declared forward-run convention; it does not assign a convention to the historical trace program. A finer counting unit can move the fraction toward one without improving the workload. Request splitting at a FIXED unit, in contrast, leaves N and A unchanged. summarizeBytes(byteRanges, blockBytes) accepts exact integers or BigInts. Offsets and lengths must be nonnegative/positive respectively and exact multiples of the positive counting unit. Nonaligned input is rejected, not rounded, padded or truncated. Empty input yields null. Repetitions still count. The output reports the counting unit and requested byte count alongside N,A and N-1. These units do not claim the device's logical or physical sector size. The distinction has a practical reporting basis: Linux v6.12 documents /sys/block//stat sector counts in 512-byte sectors, while the queue ABI separately documents logical_block_size and physical_block_size. The stat counter is not an ordered request trace and cannot supply this score by itself. Sources reviewed 2026-11-25: https://raw.githubusercontent.com/torvalds/linux/v6.12/Documentation/block/stat.rst https://raw.githubusercontent.com/torvalds/linux/v6.12/Documentation/ABI/stable/sysfs-block Conway 2024 section 3 motivates block counting, but the two-resolution counterexample and formula here are Hesela derivations, not reported paper measurements or a claim that its results used inconsistent units. Generate with unitDocument() or run publish.mjs . Tests add 1152 aligned-refinement cases with explicit small-block enumeration and retain all previous trace/window oracles. No new dependency or device I/O is used. ## Streaming-memory diagnostic Run node content/research/layout-score-trace/memory-check.mjs from the repository or this source assembly. It reads the pinned parent model from Git and compares fresh Node subprocesses at 40000 and 160000 generated ranges, twice each. memory-observation.json records post-GC live-heap samples while counting is in progress and checks exact outputs. It is a bounded implementation diagnostic, not a timing benchmark, RSS measurement or production-memory prediction.