# PASTA and two different observation populations

This is an exact constructed example, not a device experiment, a reproduction
of a paper's simulation, or a finite-sample validation of PASTA.

One initially empty FIFO server, 1 ms of service per request, no other work,
no rejection, preemption or overhead. Each schedule admits 10 requests and
finishes all of them inside [0, 20) ms. The integer tick is 0.1 ms.
Completions precede arrivals when timestamps tie; requests have distinct
arrival times. Busy-before excludes the arriving request itself.

- Periodic: 0, 2, ..., 18 ms.
- Pairs: 0/0.5, 4/4.5, 8/8.5, 12/12.5, 16/16.5 ms.
- Burst: 0, 0.1, ..., 0.9 ms.

Integrating occupied service intervals gives 10/20 busy time in every case.
Counting arrivals that find earlier work outstanding gives 0/10, 5/10 and 9/10.
Repeating each 20 ms schedule preserves the fractions because every cycle
starts empty. The paired schedule happens to agree with the time fraction;
equality in a trace does not establish a Poisson process.

## Reproduce
Python 3 standard library, no random seed or third-party dependencies:

```sh
python3 model.py --check
python3 -m unittest test_model.py
python3 -O -m unittest test_model.py
```

Run model.py without --check to regenerate results.json. Arithmetic uses
integers and fractions. Tests include 378 independent tick-queue comparisons,
boundary ties, repeated periods, time scaling, invalid inputs and unfinished
cohorts. This small exact calculation makes no statistical confidence claim.

Canonical publication: https://hesela.dev/terms/pasta/
Human explanation: https://hesela.com/analyses/storage-latency-coordinated-omission/#arrival-time-sampling

## Sources and interpretation
Ronald W. Wolff, Poisson Arrivals See Time Averages, Operations Research 30(2),
223-231 (1982), DOI 10.1287/opre.30.2.223. Section 1, Theorem 1 and Remark 1
supply the convergence and nonanticipation conditions. The arrival sees the
pre-arrival state; a queue can depend on earlier arrivals. No source figures
or substantial source text are redistributed.

Francois Baccelli, Sridhar Machiraju, Darryl Veitch and Jean Bolot, The Role
of PASTA in Network Measurement, SIGCOMM 2006, pp. 231-242,
DOI 10.1145/1151659.1159940. Sections 2 and 4 distinguish sampling from
recovering the behavior of an unprobed system. The storage interpretation is
an application of that distinction, not a storage measurement from the paper.

The schedules and extension to three equal-work examples are illustrative
arithmetic. They do not test a random-arrival hypothesis or prescribe an I/O
generator. Inspect actual arrivals, admission/rejection and measurement scope.
