Multi-level page table 2026-10-14
A hierarchy of page tables indexed by successive groups of virtual page number bits. Unused regions can omit lower-level tables.
The useful omission is an entire lower-level array, not merely an invalid page table entry. One absent upper-level entry can represent a large unmapped interval of the address space. The Linux kernel's documented hierarchy uses this idea to avoid allocating tables for unused regions; its software levels can also be folded to match the hardware. [ref]
Page table entry 2026-10-14
One record in a page table, holding a page frame number or a next-level table reference together with architecture-dependent flags. Effective permissions in a multi-level page table can depend on several entries, not just the final one.
Let be the number of accesses, the miss count and the number of dirty-victim page writebacks. Assume every requested memory page has a backing copy, every miss reads it, writes modify only part of its contents, transfers succeed and occur serially, and there is no background or final flushing. With common access cost , additional load cost per miss, and additional outgoing write cost per dirty victim, an illustrative total service time is
Bookkeeping and other operating system costs are omitted. The two transfer directions are separate: a miss can require a read with no write, or both a victim write and a requested-page read. A retained dirty memory page contributes no outgoing write to this finite-page-reference trace count until evicted. Future flushing would need its own accounting boundary.
For three-page frame FIFO page replacement on the displayed page-reference trace, all reads give . Change only access 1 to a partial write of memory page 1. Its initial miss still loads the old contents, the write marks it dirty, and eviction at access 4 adds exactly one page writeback. Later loads of memory page 1 are clean because the remaining accesses read. The result is : identical residency and nine misses, but one extra outgoing write. With illustrative nanoseconds, millisecond and milliseconds, total service time changes from to milliseconds. These are model costs, not hardware measurements.
Preferring a clean victim can save an immediate page writeback, but evicting a soon-needed clean memory page can add later misses. This tradeoff is why a miss-minimizing optimal page replacement benchmark and a minimum-cost policy are different questions. Real page faults can also initialize a new memory page or perform copy-on-write without reading backing storage; those cases require different load costs.
// Destination: computer-science.bigb
Dirty memory page 2026-10-14
A resident memory page with modifications that must be preserved in its backing storage before its page frame can be reused. In the simple model here, a write sets its dirty flag, and successful page writeback clears it. A clean memory page with a recoverable backing copy can be discarded without an outgoing data write.[ref]
Bélády's anomaly 2026-10-14
Increasing the number of page frames can increase misses under a given page replacement policy on the same page-reference trace. For FIFO page replacement on the displayed twelve-reference sequence, an empty start with three page frames gives nine misses, while an empty start with four gives ten. The larger run hits only at indices 5 and 6; it misses at 1–4 and 7–12. These are miss counts, not observed running times.[ref]
Figure 1.
FIFO page replacement queue states and cumulative misses: four page frames give ten misses versus nine with three
. Details.
The explanation is visible before the final count. After access 6, the three-page frame queue is and the four-page frame queue is , both oldest first. Loading memory page 5 at access 7 removes memory page 4 in the smaller run but memory page 1 in the larger. Their resulting resident sets are and . The smaller resident set is not a subset of the larger: its next access to memory page 1 hits while the larger run misses. Different earlier evictions create different histories; an extra page frame is not simply an extra unchanged slot. FIFO page replacement can improve on other sequences; the anomaly is an existence claim, not a claim that more page frames usually hurt.
Optimal page replacement 2026-10-14
On a miss with all page frames occupied, evict the resident memory page whose next access is farthest in the remaining page-reference trace. Treat no further access as farther than any finite next-use index; in the diagram, ties choose the lowest-numbered page frame. This is an offline, clairvoyant benchmark: a general operating system cannot know its future memory references. It minimizes miss count in the stated fixed-capacity demand paging model, rather than predicting the future from temporal locality.[ref]
In the page-reference trace, seven misses with three page frames is therefore a lower bound for any policy using the same assumptions; with four page frames the corresponding minimum is six. The benchmark is useful for judging how much improvement is possible on a recorded workload. Its objective counts each miss equally. Different page writeback costs or unequal loading costs require a different objective; minimum misses alone does not prove minimum elapsed time.
Page-reference trace 2026-10-14
A memory access trace reduced to the ordered sequence of accessed memory page identities, retaining repetitions. An address-only reduction loses read/write information, so annotate writes when studying dirty memory pages. Use the following classic Belady anomaly sequence, where the numbers label memory pages, not physical addresses:
Start with three empty, equal-sized page frames allocated to one operating-system process. Every memory page can occupy any page frame, and every resident memory page is eligible for eviction. Use demand paging: a hit finds the requested memory page in the resident set; a miss causes exactly one nonresident page fault and loads it before the next access. Fill the lowest-numbered empty page frame, then reuse the victim's page frame. Assume only reads, no fetching ahead of requests, no competing operating-system processes, and no external removal of memory pages. CLOCK page replacement uses its declared hand rule, which fills the same initial page frames here. The memory page labels alone do not determine the result without these assumptions.
Figure 1.
All twelve accesses with three page frames: FIFO page replacement, exact LRU replacement, offline optimal page replacement and the stated CLOCK page replacement variant
. Details.
Each column shows the state after servicing that access. Rows keep physical page frame positions fixed, rather than silently sorting the resident set. The CLOCK page replacement entries also show reference bits and the next hand position. The independently computed totals are:
PolicyMiss indices, counted from 1MissesHits
FIFO page replacement1, 2, 3, 4, 5, 6, 7, 10, 1193
LRU replacement1, 2, 3, 4, 5, 6, 7, 10, 11, 12102
Optimal page replacement1, 2, 3, 4, 7, 10, 1175
CLOCK page replacement1, 2, 3, 4, 5, 6, 7, 10, 1193
The first three misses fill unused page frames; the fourth miss needs eviction. At access 4, FIFO page replacement and LRU replacement evict memory page 1. Optimal page replacement instead evicts memory page 3: the next uses of resident memory pages 1, 2 and 3 are at indices 5, 6 and 10. At access 10, FIFO page replacement evicts memory page 1 while LRU replacement evicts memory page 5. Consequently the last access to memory page 5 hits under FIFO page replacement but misses under LRU replacement. Matching totals for FIFO page replacement and CLOCK page replacement on this sequence do not make the policies equivalent. The generators compute every displayed state; a separate search over all legal victims confirms the seven-miss optimal page replacement bound for three page frames.
FIFO page replacement 2026-10-14
Evict the memory page loaded earliest among currently resident memory pages, without refreshing its position on access. It is simple but ignores temporal locality and can evict a frequently accessed memory page.
Implement this ranking with a FIFO queue of resident memory pages: append on loading, remove the oldest on eviction, and leave the queue unchanged on a hit. Belady anomaly shows why preserving arrival order can give more misses with more page frames. The comparison uses the same page-reference trace and empty initial resident sets in both runs.[ref]
LRU replacement Created 2026-10-14 Updated 2026-10-20
Evict the least recently accessed eligible item. Exact recency tracking on every memory reference can be expensive, whereas accesses to a buffer cache already pass through software. Recency captures temporal locality but a long scan can evict frequently reused items before their next use.
For page replacement, update recency on hits as well as misses; evict only when a miss requires a page frame and all eligible page frames are occupied. The four-page cycle in memory thrashing shows how exact LRU replacement behaves at capacities three and four.[ref]
The LRU stack property compares different capacities on one fixed page-reference trace; it does not say that LRU replacement always beats FIFO page replacement. On the displayed sequence, three-page frame LRU replacement has ten misses, versus nine for FIFO page replacement, while four-page frame LRU replacement has only eight.
CLOCK page replacement 2026-10-14
Keep page frames in a circular list with a reference bit and a scanning hand. Clear set reference bits while scanning; choose the first eligible page frame with a clear reference bit. This second chance approximates LRU replacement with cheaper tracking. When hardware reference flags are absent, revoking a mapping and handling its first later page fault can supply a software reference observation.
For the page-reference trace, number the three page frames 1–3 and initially point the hand at 1. Every access sets the referenced page frame's reference bit to 1. On a miss, scan from the hand: stop at an empty page frame or a resident one with reference bit 0; otherwise clear its reference bit and advance cyclically. Install the requested memory page with reference bit 1 and advance the hand to the next page frame. Hits leave the hand where it is. This fixes a particular variant; clean-victim preference is excluded.[ref]
After the first three accesses, all reference bits are 1 and the hand is back at page frame 1. Access 4 clears all three reference bits, returns to page frame 1, evicts memory page 1, installs memory page 4, and leaves the hand at page frame 2 with reference bits . This variant gives nine misses for three page frames and ten for four on the displayed sequence. Approximating LRU replacement therefore does not inherit the LRU stack property.
// Destination: computer-science.bigb
Page fault rate 2026-10-14
For a specified interval of memory references, the number causing a page fault divided by the total number of memory references. In the nonresident-only toy model in memory thrashing, this equals the miss fraction used as probability in the expected value calculation. Startup and later intervals can have very different page fault rates.
iomap Created 2026-10-14 Updated 2026-11-05
iomap is a Linux filesystem library that iterates over file-offset ranges and provides common operations using their mappings. A filesystem can describe a logical range as mapped storage, a hole or another supported state; the common layer then performs actions such as buffered reads, writeback or direct input/output. The range-based design can handle larger extents than repeatedly mapping individual small blocks. Storage addresses are not required for every operation, since some uses inspect cached file information. It is a mapping and I/O framework, rather than a particular on-disk filesystem format.[ref]
// Destination: computer-science.bigb
Linux folio Created 2026-10-14 Updated 2026-11-05
A Linux folio represents one or more base pages managed together as a unit of memory, particularly in the page cache. Its extent is power-of-two sized, physically contiguous and naturally aligned in the usual folio representation. A folio can therefore be larger than a single base page without forcing each caller to treat every constituent page as an independent cache object. The abstraction simplifies reasoning about shared state such as locking and dirty status. A large folio and a virtual-memory huge-page mapping are related mechanisms but not identical concepts.[ref]
Linux buffer head 2026-10-14
The Linux kernel's per-block state structure, which can be attached to a Linux folio. Its reference counting is distinct from its dirty and valid state.
2-adic integer Created 2026-10-14 Updated 2026-11-05
A 2-adic integer is an element of the p-adic integers for , equivalently a compatible sequence of residues modulo . Its binary p-adic digits begin with its parity. The highlighted residue-tree path for begins , while modular inversion converges to a p-adic inverse computes the infinite expansion of .
7-adic integer Created 2026-10-14 Updated 2026-11-05
A 7-adic integer is an element of the p-adic integers for , equivalently a compatible sequence of residues modulo . Its p-adic digits lie in . For example, has low-to-high digits .
Open subgroups of the p-adic integers Created 2026-10-14 Updated 2026-11-05
The cosets form a neighborhood basis in the additive group of p-adic integers. An open subgroup contains for some , so has finite index. Conversely, if the index is , the finite quotient is annihilated by , giving . Multiplication by the unit part of is bijective, so is open. This proof applies to abstract subgroups without assuming beforehand that they are closed.
Acidic permanganate-iron balance Created 2026-10-14 Updated 2026-10-20
An increase in oxidation state records oxidation; a decrease records reduction. Thus raises the iron oxidation state by one, while lowers the manganese oxidation state from to . Five iron ions supply the five-electron inventory required per permanganate ion.
In an acidic chemical solution, the complete half-reactions are
First balance oxygen with four water molecules, then hydrogen with eight protons, and finally electric charge with five electrons. Multiply the iron half-reaction by five and add; the exchanged electrons cancel:
Both sides contain one manganese, four oxygen, eight hydrogen and five iron chemical atoms, with net electric charge . The notation represents the acidic aqueous proton inventory; it does not imply bare protons moving independently of water. These half-reactions and their sum are the acidic balance used in the documented permanganate-iron titration.[ref]
Figure 1.
Acidic permanganate-iron balance: five exchanged electrons and conserved chemical atom and electric charge inventories
. Original exact stoichiometry diagram. Matching five formal electron slots is a bookkeeping operation, not a picture of free electrons in the chemical solution. The lower table verifies the net chemical equation; its is the net electric charge number of the written reacting species, not the bulk chemical solution. Details.
The coefficients predict amounts consumed, not a collision of five ions or an elementary reaction. Bulk chemical solution also contains compensating counterions, which are omitted from this net chemical equation. The hydrogen and oxygen oxidation states are unchanged; balancing their inventories remains essential even though they do not account for the exchanged electrons.
Oxidation state sum rule Created 2026-10-14 Updated 2026-10-20
Sum oxidation states over all chemical atoms of the specified molecule, ion or formula unit, including multiplicities:
Here is the net electric charge and the positive elementary charge. For a neutral entity the sum is zero; for an ion it equals its signed electric charge number . The reason is simple: the allocation assigns every valence electron exactly once, so the sum is the neutral electron budget minus the actual electron count.
For water, ; for hydrogen peroxide, . In permanganate, , assigning each oxygen gives , so manganese has oxidation state . This is not a free ion: the entire permanganate anion has net electric charge . The sum rule supplies a constraint; without additional assignments it cannot determine every individual oxidation state.
Ionic approximation of bonds Created 2026-10-14 Updated 2026-10-20
For the routine examples here, assign all bonding electrons between different chemical elements to the more electronegative partner; divide bonding electrons between identical chemical elements equally. Retain each lone pair on its original chemical atom. Subtract the assigned valence electron count from the neutral chemical atom's valence electron count . The IUPAC convention uses Allen electronegativity, based on free-chemical atom valence electron energies. Close electronegativity comparisons and some reversibly bound chemical compounds require care beyond this simple rule.[ref]
Figure 1. . Original bookkeeping diagrams, not electron density maps or measured partial atomic charges. Arrows indicate allocation of bonding electrons; an equal split is used for O–O. The sodium hydride panel represents a formula unit of an ionic compound, not an isolated gas-phase molecule. Details.
The examples explain exceptions to memorized rules:
These drawings record allocations, not molecular geometry or a physical process of breaking the chemical bonds. In particular, the O–O line in the molecular oxygen panel only marks the connection; it does not assert a complete Lewis structure or spin state.

There are unlisted articles, also show them or only show them.