Check out my first novel, midnight's simulacra!

Extended disquisitions pertaining to eXpress data paths (XDP) and Computer science eponyms: Difference between pages

From dankwiki
(Difference between pages)
Jump to navigation Jump to search
 
No edit summary
 
Line 1: Line 1:
'''[[Dankblog|dankblog!]] 2023-04-20, 0423 EST, at [[Viewpoint|the danktower]]'''
Computer science needs more eponyms, in the vein of [http://en.wikipedia.org/wiki/Mordenkainen#Spells Mordenkainen]. Collect them all, and impress your friends! I might make a project one day of [[book ideas|summarizing these entries]].


I've spent the past three months building a substantial [[XDP]]-based application for my employer, intended to be run in [[Azure]] using the latter's "Accelerated Networking" ([[SR-IOV]]). By "substantial", I mean that it includes a significant userspace component using <tt>AF_XDP</tt> sockets, that the XDP code must use dynamic configuration data, and that it must operate on arbitrary hardware configurations. I've not seen any documentation that covers the details of such an application, whether official Linux kernel documentation, conference papers, or the essays of the technorati. Most examples involve simple packet filtering using static data, never touching on the <tt>AF_XDP</tt> funnel to userspace that makes XDP an actual eXpress Data Path and not just a good place to stick some [[eBPF]]. I hope with this post to somewhat remedy that situation.
Explicitly ''not included'' in this list are: general logic (Peano and Presburger arithmetic, Herbrandization), mathematical entities not primarily associated with computer science (Markov's inequality, Chapman-Kolmogorov equation, Young tableaux), physical theories to which computer science is merely applied (Navier-Stokes equations, Taylor-Couette flow), nor statistical entities not primarily associated with computer science (Ziph's Law, Pareto efficiency). Explicitly ''included'' are: terms from computer engineering (Mead-Conway rules, Ling adders).


These kinds of applications are typically developed atop the [[DPDK|Data Plane Development Kit]]. I chose XDP over the DPDK, and would be remiss were I not to first discuss that more established technology.
Of course, it can't be on the list unless I know about it, so [mailto:dankamongmen@gmail.com feed me eponyms].


If you're new to XDP, you might want to read [[XDP|my page on that topic]]. I recently (2023-02-03) gave [[:File:Black - Fast Linux Networking 2023.pdf|a presentation]] to Microsoft Azure Orbital you might also read. I'm not a true expert on either of these two technologies yet, but I probably know more than you do.
'''UPDATE''' the threshold for inclusion is now: '''De Morgan's Laws'''. If you're not at least as computer sciency as '''De Morgan's Laws''', you ain't gettin' in. [[User:Dank|Dank]] 12:25, 3 October 2011 (CDT)


==DPDK==
Intel's (now the Linux Foundation's) DPDK saw public release in late 2010 under the BSD license. It is mature technology with extensive hardware support and great documentation, and several general-purpose applications have been released on top of it. It consists of the Runtime Environment (RTE), the Environment Abstraction Layer (EAL), and Poll-Mode Drivers (PMDs) for various hardware and paravirtualized NICs. Devices are bound to Linux's [https://www.kernel.org/doc/html/latest/driver-api/vfio.html Virtual Function I/O] (VFIO) or [https://www.kernel.org/doc/html/latest/driver-api/uio-howto.html Userspace I/O] (UIO) subsystems rather than using their typical kernel drivers. This allows userspace to perform basic PCIe BAR configuration, necessary for registering buffers and enabling the card. The RTE sets up tx/rx data ("mbuf") rings (ideally backed by [[Pages|huge pages]]), and descriptor rings for same. The PMD then begins polling on the RX descriptor ring. Packets are received entirely without overhead, and processed in userspace without any compulsory context switches (mbufs can be transferred among cores using the "rings" subsystem of the RTE). Like any userspace networking system worth the price of entry, careful attention has been paid to isolation and affinity of threads, constraining allocation to local NUMA nodes, interrupt mapping, and NIC features like [[RSS]].


I'd argue that XDP is an implementation of [[Van Jacobson Channels|Van Jacobson channels]], while DPDK is a true userspace networking stack. The most fundamental difference is that a device bound to DPDK is <i>no longer a Linux networking interface</i> (usually. I believe there's something called dtap which gets around this somehow?). It will not show up in <tt>ip link</tt> output, and will not have an entry in <tt>/sys/class/net</tt> (it <i>will</i> show up on the PCIe bus). DPDK furthermore encompasses devices beyond network interface cards, including crypto, dma, and regex accelerators. The userspace application configures the device through UIO, and after that theoretically needn't touch the kernel (i.e. invoke system calls) to perform I/O. Everything is based off userspace ringbuffers and memory-mapped I/O.
* '''Aanderaa–Rosenberg Conjecture''' suggests that non-trivial monotonicity properties of undirected graphs can only be solved by ''Ω(N<sup>2</sup>)'' algorithms on ''N'' vertices (these are all evasive decision trees on all possible edges)
* '''Adam7 Algorithm''' is a 2D, 7-pass interlacing scheme optionally used by PNG due to Adam Costello
* the '''Adler-32''' checksum trades reliability for speed relative to CRCs of the same length, and is included in Mark Adler's zlib
* '''Adleman's Theorem''' states that P/poly contains all problems solvable in randomized polynomial time
* '''Adelson-Velskii-Landis Trees''' are self-height-balancing binary search trees, optimizing for lookup over modification viz. red-black trees
* '''Aho-Corasick Algorithm''' extends the Knuth-Morris-Pratt automaton to match multiple strings in one pass of a text
* '''Akra-Bazzi Method''' generalizes the "master method" of Bentley, Haken, and Saxe for subproblems of significantly different size
* Amdahl's Law
* Andersen's Algorithm
* Angluin's algorithm
* '''Arikan's PAC Codes''' aka polarization-adjusted convolutional [https://en.wikipedia.org/wiki/Polar_code_(coding_theory) polar coding] outperform CRC-aided and purely convolutional polar codes, approaching the theoretical channel capacity for short blocklengths.
* '''Armstrong's axioms''' are a set of inference rules which generate all functional dependencies of a relational database. Similarly, an '''Armstrong relation''' satisfies all the functional dependencies in the closure F<sup>+</sup> (and only those dependencies).


With a dual-port 10GBASE-T Intel X550 (<tt>ixgbe</tt> driver), we see the following in <tt>lspci</tt>:
* Backus-Naur Form
<pre>
* Bajard-Kla-Muller algorithm
44:00.0 Ethernet controller: Intel Corporation Ethernet Controller X550 (rev 01)
* Ball-Larus Heuristics
44:00.1 Ethernet controller: Intel Corporation Ethernet Controller X550 (rev 01)
* the '''Banerjee test''' can demonstrate the absence of [[Compiler_Design|control flow dependencies]] in certain types of loops
</pre>
* Barendregt convention
With no driver loaded, <tt>dpdk-devbind.py --status</tt> shows:
* Barendregt-Geuvers-Klop Conjecture
<pre>
* Barnes-Hut simulation
Other Network devices
* the '''Barton-Nackman trick''' is an idiom in C++ effecting restricted template expansion
=====================
* Baskett, Chandy, Muntz and Palacios network
0000:44:00.0 'Ethernet Controller X550 1563'
* Batcher's Odd-Even Merge
0000:44:00.1 'Ethernet Controller X550 1563'
* '''Bayer Filter''' mosaics arrange RGB color filters on a square array of photosensors, and are used in a majority of single-chip image sensors. It uses twice as many green sensors as red or blue, to mimic the physiology of the human eye
</pre>
* '''Bélády's algorithm''' is the theoretically best cache-replacement algorithm, one which discards information that will not be needed until the furthest time into the future (this is not usually knowable)
We load the <tt>ixgbe</tt> driver, bringing up <tt>ixgbe1</tt>, and now see:
* '''Bélády's anomaly''' is the phenomenon in which increasing the number of page frames results in an ''increase'' in the number of page faults for certain memory access patterns, especially when using FIFO page replacement
<pre>
* Bell-La Padula model
Network devices using kernel driver
* the '''Bellman Equation''' specifies for a problem the necessary condition for optimality of dynamic programming
===================================
* Bellman-Ford Algorithm
0000:44:00.0 'Ethernet Controller X550 1563' if=ixgbe0 drv=ixgbe unused=
* Beneš network
0000:44:00.1 'Ethernet Controller X550 1563' if=ixgbe1 drv=ixgbe unused= *Active*
* Bentley-Ottman Algorithm
</pre>
* Berlekamp-Massey Algorithm
We can unbind the driver from one of the ports using <tt>dpdk-devbind.py -u ixgbe0</tt>. Our <tt>ixgbe0</tt> interface disappears, and we now have:
* Berman–Hartmanis conjecture
<pre>
* Bernstein chaining
Network devices using kernel driver
* Bernstein conditions
===================================
* Biba Integrity Model
0000:44:00.1 'Ethernet Controller X550 1563' if=ixgbe1 drv=ixgbe unused= *Active*
* Blinn-Phong shading
* Blom's Scheme
* Bloom filter
* Bluestein's FFT
* Blum's axioms
* Blum's Speedup Theorem
* Blum-Blum-Shub random number generator
* Boehm-Demers-Weiser garbage collector
* the '''Boolean''' data type takes on values of true or false, as do variables in George Boole's algebra
* Booth's Algorithm
* Borůvka's Algorithm
* Bowyer-Watson Algorithm
* Boyer-Moore Algorithm
* the <b>Brassard-Høyer-Tapp algorithm</b> solves the collision problem on a quantum computer in O(n<sup></sup>) queries
* Bremermann's Limit
* '''Brent's Adder''' is logn + O(log1/2n) depth and O(nlg n) size
* '''Brent's Algorithm''' detects cycles using two pointers, and finds the length of the cycle directly
* '''Brent's Method''' is a hybrid root-finding algorithm combining bisection, the secant method, and inverse quadratic interpolation
* '''Brent's Theorem''' aka '''Brent's Law''' states that p < N processors can simulate N in T<sub>p</sub> ≤ T<sub>N</sub> + (T<sub>1</sub> - T<sub>N</sub>)/p
* Bresenham's Algorithm
* Brewer's Theorem
* Brodal Queue
* Broder's Method
* Bron-Kerbosch Algorithm
* Brooks-Iyengar Algorithm
* Buchberger Algorithm
* the '''Burnside-Dixon Algorithm''' calculates irreducible representations of finite groups
* Burrows-Wheeler Transform
* Buzen's Algorithm


Other Network devices
* Callahan-Koblenz algorithm
=====================
* Cannon's Algorithm
0000:44:00.0 'Ethernet Controller X550 1563' unused=ixgbe
* Cantor-Zassenhaus Algorithm
</pre>
* Carmack's Reverse
We load the <tt>uio_pci_generic</tt>, <tt>vfio-pci</tt>, and <tt>igb_uio</tt> kernel modules (the first two are provided in kernel sources; the last comes from DPDK, and is built by DKMS):
* Catmull-Clark subdivision surfaces
<pre>
* Chaff Algorithm
Network devices using kernel driver
* Chaitin's algorithm
===================================
* Chaitin's Constant
0000:44:00.1 'Ethernet Controller X550 1563' if=ixgbe1 drv=ixgbe unused=igb_uio,vfio-pci,uio_pci_generic *Active*
* Chaitin-Briggs algorithm
* Chaitin–Kolmogorov random numbers
* Chakravala's Algorithm
* '''Chan's Algorithm''' computes the optimal h-point convex hull of n 2- or 3-dimensional points in O(nlgh)
* Chandy-Lamport Algorithm
* the '''Chang-Roberts Algorithm''' elects leaders for distributed systems.
* '''Chen's Algorithm''' is an exact quantum algorithm for testing 2-junta
* '''Chen's Algorithm''' is a single-writer, multiple-reader, wait-free lock using Compare-and-Swap
* the '''Chen-Teboulle Algorithm''' solves the proximal point algorithm efficiently for certain functions
* Cheney's Algorithm
* Chew's Second Algorithm
* Chien search
* '''Cholesky decomposition''' expands Hermitian positive-definite matrices into products of a lower triangular matrix and its conjugate transpose. solved using the Cholesky–Crout and Cholesky–Banachiewicz algorithms.
* Chomsky Hierarchy
* Chomsky Normal Form
* Chomsky-Schützenberger theorem
* Christofides Algorithm
* Church encoding
* Church-Rosser Theorem
* Church-Turing Thesis
* the '''[https://clifford.at/cliffords-device.html Clifford Device]''' exploits <tt>if(0)</tt> to abstract block control via macros (note that e. g. [https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3355.htm N3355] calls this "Claire's Device" following a presumed transition, but Claire still seems to call it Clifford).
* Clos network
* Cobham Axioms
* Cobham's thesis
* Cocke-Younger-Kasami Algorithm
* Cohen-Sutherland algorithm
* '''Coffman conditions''' enumerate the four conditions necessary and sufficient for deadlock within a system (mutual exclusion, hold-and-wait, a lack of preemption, and circular wait)
* Commentz-Walter Algorithm
* [https://en.wikipedia.org/wiki/Conway%27s_law Conway's Law]
* Cook reduction
* the '''Cook-Levin Theorem''' (sometimes just '''Cook Theorem''') proves that the Boolean satisfiability problem is NP-complete.
* the '''Cooley-Tukey Algorithm''' is the workhorse algorithm for Fast Fourier Transforms.
* the '''Coppersmith-Winograd Algorithm''' multiplied matrices in the least time complexity from 1990-2010, and used the "laser method" employed by all improvements since.
* Craig, Landin and Hagersten lock
* Cranfield method
* (preconditioned) Crank–Nicolson Algorithm
* Crusader’s Convergence Algorithm
* Curry-Howard correspondence
* The <b>CVM algorithm</b> (Chakraborty, Variyam, Meel) approximates the number of distinct elements in a large set


Other Network devices
* Dadda Multiplier
=====================
* Damerau-Levenshtein distance
0000:44:00.0 'Ethernet Controller X550 1563' unused=ixgbe,igb_uio,vfio-pci,uio_pci_generic
* Damm Algorithm
</pre>
* Davis-Putnam Algorithm
We now have one port suitable for use by a DPDK application using the <tt>igb_uio</tt> passthrough. Note that the UIO passthroughs are inferior to <tt>vfio-pci</tt> (which also would have worked), due to their inability to use [[IOMMU|IOMMUs]] and lack of DMA-safety. <tt>uio_pci_generic</tt> doesn't support even support [[MSI]], making it unusable under SR-IOV or with [[RSS]].
* Davis-Putnam-Logemann-Loveland Algorithm
* De Bruijn presentation
* De Bruijn string
* Dekker's Algorithm
* Delaunay's Triangulation
* Dennard Scaling
* Deutsch gate
* Diffie-Hellman Key Exchange
* Dijkstra's Algorithm
* Dinic's Algorithm
* '''DiVincenzo's criteria''' specify conditions necessary for a quantum computer
* Dolev's Algorithm
* Doo-Sabin subdivision surface
* Duff's Device
* Dyck Language


Anyway, this was supposed to be about <tt>AF_XDP</tt>. But there's your whirlwind introduction to DPDK. The essential bedrock fact is: <b>DPDK is a mature system for fast userspace packet dancing. It likes to poll. It cares about your machine and its setup only so far as it gets in DPDK's way.</b>
* Earle latch
* Earley Parser
* '''Edholm's law''' predicts doubling of bandwidth every 18 months across wireless, nomadic, and wired networks (and is getting some rather heavy lift from Moore's Law IMHO)
* '''Edmonds's matching algorithm''' constructs maximum matchings on graphs in O(|E||V|²)
* Edmonds-Karp Algorithm
* ElGamal encryption
* ElGamal signatures
* van Emde Boas trees
* Sieve of Eratosthenes
* the '''Eytzinger layout''' stores binary trees in an array in a cache-friendly manner
* Euclid's Algorithm


===Why AF_XDP?===
* '''Fagin's Theorem''' states that the set of all properties expressible in existential second-order logic is precisely the complexity class NP
The fundamental value proposition of <tt>AF_XDP</tt> (aside from the fuzzy feeling of needing not leave the upstream kernel tree) is this: <b>DPDK wants to own its cards and their traffic.</b> By default, once a NIC is being used by DPDK, it's lost to the rest of the machine (this can be worked around using both software dispatch and NIC hardware queues, I believe). DPDK requires understanding a fairly large and esoteric system with its own <i>ex nihilo</i> API. The kernel receive path is rather more heavyweight than its transmit path; XDP focuses on this more usefully elided RX path. I expect both to fester/live through at least the decade's end.
* '''Falk diagrams''' graph various performance counters against time (typically expressed in cycles)
* Faugère F5 algorithm
* '''Fenwick trees''' support efficient update of elements and calculate prefix sums in a table of numbers
* Fiat-Shamir Heuristic
* Fibonacci Heap
* Fisher-Yates shuffle
* Flajolet-Martin algorithm
* Fletcher's Checksum
* Floyd's Algorithm
* Floyd-Steinberg dithering
* Flynn Taxonomy
* Ford-Fulkerson Algorithm
* Fortune's Algorithm
* Fox's Algorithm
* Fredkin gate
* Friedberg-Muchnik Theorem
* Fruchterman-Reingold heuristic
* '''Fürer's algorithm''' multiplies two ''n''-digit numbers in ''O(nlgn*2<sup>O(lg*n)</sup>)''
* the '''Ferguson-Forcade''' algorithm was the first for the integer relation problem (<i>Bull. Amer. Math 1979</i>)


====Before AF_XDP====
* Gabbay's separation theorem
By the way, there are several other intersections of eBPF with the RX path for doing more or less this same kind of thing. You can attach eBPF to [https://docs.cilium.io/en/latest/bpf/progtypes/#tc-traffic-control ingress tc] (traffic control)'s <tt>cls_bpf</tt> classifier, with its own (incompatible) set of hooks and actions. This is what you want if you can accept the skbuff creation hit and want to work on that more flexible structure. It is furthermore largely device/driver-independent. You can also attach eBPF to a socket using the <tt>SO_ATTACH_BPF</tt> sockopt, though this can only AFAIK be used to filter ingress.
* Gabow's Algorithm
* Gal's Accurate Tables
* Gale-Church Algorithm
* Gale-Shapley algorithm
* Gilbert-Johnson-Keerthi Algorithm
* Girard's Paradox
* Girvan-Newman Algorithm
* Givens rotation
* Glushkov Automata
* Goldreich-Goldwasser-Halevi scheme
* The weighted '''Gomory-Hu Tree''' of an undirected graph with capacities G represents the minimum s-t cuts for all s-t pairs in G, and is computable via |V|-1 maximum flow problems.
* Gordon–Newell theorem
* Gosper's Hack
* Gosper's Hypergeometric Algorithm
* Gosper's Loop Detection Algorithm
* Gouraud shading
* The '''Graham Scan''' solves for the convex hull of a set of points in ''O(NlgN)''.
* The '''Graham-Andrew Algorithm''' modifies the Graham Scan to solve for convex hulls in ''O(N)'' best case.
* Graham-Denning Model
* Gram–Schmidt process
* Gray codes
* Greibach Normal Form
* Grover's Algorithm
* Grzegorczyk hierarchy
* Guruswami-Sudan Algorithm
* Gustafson's Law
* '''Gutmann's Method''' is a 35-phase recipe for destroying data on ferromagnetic drives.
* Guttman-Rosler transform


Rounding out this loose confederation is the esoteric <tt>SO_ATTACH_REUSEPORT_CBPF</tt>, which allows programmatic control of distribution among multiple listeners on the same <tt>REUSEPORT</tt>-aliased port.
* Hamiltonian path problem
* Hamming code
* Hamming distance
* the '''Håstad, Just, Lagarias, and Schnorr (HJLS) algorithm''' improves on LLL for the integer relations problem (<i>SIAM J. Comput. 1989</i>)
* '''Heap's algorithm''' generates all permutations of a set with minimum movement (<i>The Computer Journal 1963</i>)
* '''Heckel's algorithm''' isolates changes between files, and is the basis for <tt>diff</tt> [https://dl.acm.org/doi/10.1145/359460.359467 CACM 1978]
* Hennessy-Milner Logic
* Herlihy's wait-free hierarchy
* Hindley-Milner type system
* Hirschberg's Algorithm
* Hoare logic
* Holevo's Theorem
* Holland's schema theorem
* Hong-Kung bound
* Hopcroft-Karp Algorithm
* Hopfield net
* Horn clauses
* Hough transform
* Householder transformation
* Huet's Zipper
* Huffman coding
* Hunt-McIlroy Algorithm


==XDP sweetness==
* Iliffe vector
I'm not very interested in pure kernelspace XDP programs, and anyone who's spent quality time with the kernel's eBPF verifier is likely to agree. If you can get away with one for your task, awesome; do so. If all you need do is examine some headers, possibly scribble a little, maybe use a little per-cpu state, and drop the frame or kick it out some other interface, you need never leave the soft IRQ handler, and Godspeed. This is all reasonably well documented and straightforward.
* Immerman–Szelepcsényi theorem


Where I get really hot is <tt>AF_XDP</tt>, the (potentially zerocopy) path to userspace. In ways, it's like a fast <tt>AF_PACKET</tt> [[Packet_sockets|packet socket]] (on drivers without XDP acceleration, it's almost exactly like <tt>AF_PACKET</tt>), except that you can prevent the packet from progressing further through the kernel (using <tt>bpf_redirect_map()</tt> to divert to an <tt>AF_XDP</tt> socket inhibits further traversal whether the frame was copied or not, though you can clone the packet to facilitate traversal should you want to). Theoretically, we could get very close to DPDK's all-userspace, all-polled path: if we put our kernel code and userspace code on different processing elements (but accessing the same memories) we could very well match it (<b>NARRATOR: they would not match it.</b>).
* Jackson network
* Jackson's theorem
* Jaro-Winkler distance
* Jefferson's Time Warp
* Jelinek-Mercer smoothing
* Jensen's Device
* Johnson's Algorithm
* the '''Jonker-Volgenant Algorithm''' improves '''Kuhn's Algorithm''' to solve the assignment problem in O(), Jonker-Volgenant 1987


Getting the best performance out of <tt>AF_XDP</tt> requires a lot of the same system administration-esque preconditioning needed by DPDK. We're coming up on two decades of mainstream multicore: you'll need to take advantage of parallelism via multiple threads. Those threads ought be bound to isolated processing elements, which means [[Control_Groups|cgroups]] and the [[Cpuset|cpuset]] controller. These days, that means [https://www.kernel.org/doc/html/latest/admin-guide/cgroup-v2.html CGroupsv2], ideally prepared in the form of a [[systemd]] [https://www.freedesktop.org/software/systemd/man/systemd.slice.html slice]. The standard technique is a "cpu shield": you pin your threads, one thread per core, and remove those cpus from other cgroups. Likewise, interrupt handlers (aside from our NIC queues) have our cores masked out of their affinities, while relevant interrupt handlers are bound to our cores (you can't generally move all unrelated kernel work away; some kernel tasks, including soft IRQs, are fundamentally per-cpu). In the language of Cgroupsv2, you'll want your cores in a root partition, or an isolated root partition if you don't need the crutch of a scheduling domain. On [[NUMA]] systems, create a partition per zone, and bind that group to the zone's local memory nodes, holding off on allocations until bound. Of course, cgroupsv2 and cgroupsv1 can kinda coexist in a fine example of Terrible Decisions by Smart People, so you might be on a cgroupsv2 machine that has old-school cpusets with their slightly but devastatingly different semantics, so know you're pretty much fucked I guess.
* Kabsch Algorithm
* Kadane's Algorithm
* Kahan Summation Algorithm
* '''Kahn's Algorithm''' topologically sorts a graph in O(|V| + |E|), Kahn 1962
* Kannan's Theorem
* '''Karatsuba's Algorithm''' multiplies two ''n''-digit numbers using ''n<sup>log<sub>2</sub>3</sup>'' single-digit mults
* Karger's Algorithm
* '''Karn's algorithm''' extracts accurate [[TCP]] RTT measures, Karn-Partridge 1987
* Karmarkar's algorithm
* Karnaugh map
* Karp reduction
* Karp-Flatt metric
* Karp-Lipton Theorem
* Kamada-Kawai algorithm
* Kernighan-Lin algorithm
* Kirkpatrick-Seidel Algorithm
* Kleene Closure
* Kleene Plus
* Kleene Star
* Kleene–Rosser Paradox
* Kneser-Ney smoothing
* Knuth Shuffle
* Knuth-Morris-Pratt Algorithm
* Koenig Lookup
* Kohonen Algorithm
* Kohonen network
* Kolmogorov complexity
* Koomey's Law
* Kosaraju's Algorithm
* '''Krapchenko's Adder''' is an improvement over Brent's Adder, linear (3n + 6*2m, m=⌈lg n⌉) in size and logn + O(log1/2n) depth (m + 7(2m)1/2+16, m = ⌈lg n⌉).
* Kruskal's Algorithm
* '''Kryder's Law''' asserted that areal density doubles every thirteen months (this has not been true for some time). Also known as the ''Kryder rate''.
* '''Kuhn's Algorithm''' (also known as '''Kuhn-Munkres''') solves the assignment problem in polynomial time, Kuhn 1955
* The '''&#91;Karush-&#93;Kuhn-Tucker conditions''' are a set of tests to determine whether an integer programming solution is optimal, Karush 1931 Kuhn-Tucker 1951
* Kung-Leiserson systolic array
* Kuroda Normal Form


If you need serialization of a flow, direct it to a single queue, run your XDP on the single core to which that queue is directed, and stamp the frame there. You can then fling it to random processors. Otherwise, distribute frames among multiple XDP programs on different cores using multiple hardware queues. Queue counts can be retrieved with [[netlink]], but beyond that you're in ethtool country. Per-queue statistics are almost always available via ethtool's NIC-specific stats.
* Ladner's Theorem
* Lamport's Bakery Algorithm
* Lamport's Logical Clock
* Lamport's Hash
* Lamport timestamps
* Lee-Seung algorithm
* Lehmer random number generator
* Lehmer's GCD Algorithm
* Lempel-Ziv-Welch compression
* the '''Lenstra-Lenstra-Lovász (LLL)''' algorithm was the first for the integer relation problem that supplied proofs (Math Ann. 1982)
* Levenshtein automaton
* Levenshtein distance
* '''Levialdi's transform''' progressively and deterministically degrades a bitmap
* Levin reduction
* Liang-Barsky algorithm
* Lin-Kernighan Heuristic
* Linde-Buzo-Gray algorithm
* Ling adders
* Liskov's Substitution Principle
* Lloyd's algorithm
* Loop subdivision surfaces
* '''Loss-DiVincenzo machines''' are quantum computers based off electron spin as confined to quantum dots
* Luby's algorithm
* Luhn Algorithm
* Luleå Algorithm


Use [[Pages|huge pages]] where appropriate. Intel's [[DDIO]] can be very effective. For physical NICs, ensure you're using cores in the same zone (usually this just means using cores from the package supplying the PCIe root to which the device is attached. Consult [[sysfs]] to get mappings at runtime). If you've got DDIO, you're on a Xeon and probably want to look at CAT (Cache Allocation Technology) as well.
* Maekawa's Algorithm
* Mahaney's Theorem
* Manning algorithm
* Margolus gate
* Marzullo algorithm
* '''Matiyasevich's theorem''' proves that every [[Theory|recursively enumerable]] set is Diophantine, and thus proves that no algorithm exists for Hilbert's tenth problem
* McFarling-style branch predictor
* Mead-Conway Rules
* Mealy machine
* Mellor-Crummey and Scott lock
* Merkle–Damgård construction
* The '''Metropolis-Hastings algorithm''' for MCMC obtains samples from a probability distribution that is [https://en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_algorithm difficult to directly sample]
* Miller-Rabin Primality Test
* Minsky-Fenichel-Yochelson Algorithm
* Montgomery reduction
* Moore machine
* Moore's Law
* Morgensen-Scott encoding
* Möller-Trumbore algorithm


Almost all of this stuff requires root or a swath of [[Linux_APIs#POSIX_capabilities|capabilities]], and is difficult to coordinate with other programs on arbitrary systems. Allah, the All-Powerful, has fucked us again!
* Nagle's algorithm
* Nassi-Shneiderman diagram
* Needham-Schroeder Protocol
* Needleman-Wunsch Algorithm
* Neuman-Stubblebine Protocol
* '''von Neumann architecture''' aka stored-program architecture keeps instructions in the same memory as data (as opposed to Harvard architecture, which keeps the two distinct). Popularized by von Neumann, but largely based on Eckert and Mauchly's work on the ENIAC.
* Nevill-Manning algorithm
* Nick's Class
* '''Nielsen's law''' predicts slower growth for home bandwidth than computing power, suggesting that user experience will remain bandwidth-bound
* '''Nielsen's usability heuristics''' are ten (rather debatable) guidelines forming a usability heuristic for interface design
* Nisan's Generator


===Configuring XDP programs===
* '''Ogden's lemma''' extends the pumping lemma to context-free languages
* '''Otsu's Method''' is used to perform automatic image thresholding
* '''Ousterhout's dichotomy/fallacy''' is a taxonomy of ''systems'' vs ''scripting'' languages
* Otway-Rees Protocol


Most existing XDP examples, especially of the kind one finds on cute little blog posts, are minimal and fairly useless. Oftentimes the author spends significant effort introducing the basics of eBPF, meaning you read more about Clang and maps than you do XDP. Once you finally bind some code, it's doing nothing more than checking ports or addresses against some compiled-in constants and dropping matches. Serious, production-level demonstrations are few and far between.
* '''Paeth-Tanaka Algorithm''' rotates images via a method of three shears
* '''Paeth Filter''' performs 2D image compression in PNG
* PageRank Algorithm
* '''Parikh's theorem''' shows that a context free language that doesn't consider order of its terminal symbols can be expressed as a regular language, proving the existence of inherently ambiguous CFLs and that CFLs over singleton alphabets are regular. JACM 1966
* Peterson's Algorithm
* Petri nets
* Petrick's method
* Phong shading
* Plotkin's Sticky Bit
* '''Plouffe's Inverter''' was an early symbolic inverter for floating point numbers
* Pollaczek–Khinchine formula
* Pollard's Kangaroo Algorithm
* '''Pollard's ρ Algorithm''' aka '''Pollard's rho Algorithm''' factors integers in running time expected to be proportional to the square root of the smallest prime factor of the number being factored
* Popek-Goldberg virtualization requirements
* Post's correspondence problem
* <b>Post's Lattice</b> is the lattice of all clones on {0,1}, ordered by inclusion. It is used to prove sets of connectives to be functionally complete (e.g. NAND and NOR both generate functionally complete Boolean algebras).
* Postel's Law
* Prim's Algorithm
* '''Proebsting's Law''' claims that compiler technology doubles computing power [http://proebsting.cs.arizona.edu/law.html every 18 years]
* Prüfer Coding
* Prüfer Sequence


One element that's rarely touched upon is configuration of an XDP program, especially if that configuration is dynamic (i.e. it changes during runtime). The most basic means is of course embedding some constants in the C source. Leaving aside the annoyances of automatically modifying and non-interactively compiling code (let's not talk about directly patching binaries; it is after all peacetime), this is going to add some fundamental delay to your configuration cycle. The idea of rapidly reconfiguring via such a method can be rejected out of hand.
* Quines
* Quine-McLuskey algorithm


So the other obvious method is an eBPF map. Similarly to the process environment accessed with <tt>getenv(3)</tt> and <tt>setenv(3)</tt>, we can map up an array of <tt>__u32</tt> as so (in our XDP program):
* Rabin Automata
<pre>
* Rabin's Information Dispersal Algorithm
struct {                                                                                                                           
* Rabin-Karp Algorithm
  __uint(type, BPF_MAP_TYPE_ARRAY);                                                                                               
* Rader-Brenner Algorithm
  __uint(max_entries, PARAM_COUNT);                                                                                               
* Radovic-Hagersten lock
  __uint(map_flags, BPF_F_MMAPABLE);                                                                                               
* the '''Ramer-Douglas-Peucker algorithm''' decimates a series of line segments to a similar series of fewer line segments (1973)
  __type(key, __u32);                                                                                                             
* Raymond's Algorithm
  __type(value, __u32);                                                                                                           
* Reed-Muller code
} parameters SEC(".maps");
* Reed-Solomon correction code
</pre>
* Reingold's logspace Algorithm
then in our XDP-to-userspace interface definition (aka a header file) we might have, say:
* Ricart-Agrawala Algorithm
<pre>
* Rice's Theorem
enum parameters {
* Rice-Shapiro Theorem
  PARAM_IPV4_MATCH_COUNT,
* Risch Algorithm
  PARAM_IPV6_MATCH_COUNT,
* Rivest-Shamir-Adleman Algorithm
  PARAM_THREAD_COUNT,
* '''Rocchio's Algorithm''' classifies information relevance using nearest centroids
  PARAM_COUNT
* Ruppert's Algorithm
};
</pre>
Userspace can set elements with <tt>bpf_map_update_elem()</tt>, and XDP can read them with <tt>bpf_map_lookup_elem()</tt>. These interfaces are atomic. It's a system call from userspace, which is lame, but not a big deal for write-once data structures or anything we're updating infrequently. From within eBPFspace, it's a [https://www.kernel.org/doc/html/latest/bpf/instruction-set.html#jump-instructions CALL] virtual instruction with no prologue/epilogue overhead, so essentially just an atomic read (all maps are of fixed size, and bounds checking is performed by the verifier). So some immediate questions:
* Q: is there atomicity if your value type is larger than a word?  A: as far as I can tell, this is implemented via [[RCU]].
* Q: can i cache the results? A: sure, <tt>static</tt> variables work as expected. but how will you invalidate this cache? and will it actually improve performance? how?
* Q: can my value type contain pointers? A: sure, but nothing (i hope obviously) chases-and-copies them or anything, and they're not immediately useful to you in kernelspace.
* Q: how do i make them useful? A: sigh, try <tt>bpf_probe_read_user_str()</tt> etc.
* Q: can the user safely modify an area i'm reading with <tt>bpf_probe_read_user_str()</tt>? A: no, that's how bitches die, obviously not.


==XDP problems==
* '''Sattolo's Algorithm''' generates a 1-cyclic derangement of an array (a permutation such that every element ends up in a new position)
There are some serious problems imho affecting XDP usability. Some of them seem mere technical challenges; some of them seem more fundamental.
* Savitch's Theorem
* Schensted Algorithm
* Schlick's approximation
* The '''Schönhage–Strassen algorithm''' multiplies two ''n''-digit numbers in ''O(nlgnlglgn)'' bit complexity using FFTs
* Schoof's Algorithm
* Schreier-Sims Algorithm
* Schwartzian transform
* Sethi-Ullman Algorithm
* Shamir's Secret Sharing Scheme
* Shamos-Hoey Algorithm
* '''Shar's Algortihm''' is a variation on the uniform binary search of Knuth.
* Shor's Algorithm
* Sipser–Lautemann theorem
* '''Smith's Algorithm''' hashes the program counter to n bimodal (saturating) k-bit counters for dynamic branch prediction (1981)
* Smith-Waterman algorithm
* Solomonoff-Levin distribution
* Steensgaard's Algorithm
* Stehlé-Zimmermann algorithm
* '''Steiner tree problems''' are a class of combinatorial optimization problems involving determining the optimal interconnect of a graph under some objective function.
* the '''Steinhaus-Johnson-Trotter algorithm''' generates all permutations of a set (<i>CACM 1964</i>)
* Strassen's Algorithm
* Suurballe's Algorithm
* Sweeney-Robertson-Tocher division algorithm


===Overlap with desirable networking stack basics===
* Tarjan's Algorithm
Back in 1998, Ptacek and Newsham wrote one of my all-time favorite infosec papers, "[https://insecure.org/stf/secnet_ids/secnet_ids.html Insertion, Deletion, and Denial of Service: Eluding Network Intrusion Detection]." I thought it a great paper then, and have thought about it regularly in the past twenty-five (jfc!) years. The central point is that an IDS/IPS can be only as confident about the traffic reaching a process as it can faithfully reproduce the networking between itself and that process. As a simple example, imagine an IPv4 packet is fragmented into two fragments A and B. Two different payloads for "A" are sent in succession using fragment offset 0, and only then is B sent. What does a userspace socket receive--the first "A" payload, or the second? It depends on the host's networking stack (and possibly on any middleware between the IPS and the host). If the IPS doesn't match (and know!) said stack (which is generally impossible), it can lead to errors.
* Tarjan's Dynamic Tree
* Tarjan's Least Common Ancestors Algorithm
* The nondeterministic '''Tarski–Kuratowski algorithm''' produces an upper bound for the complexity of a given formula in the arithmetical hierarchy and analytical hierarchy.
* Thompson Automata
* Timsort
* Toda's theorem
* Todd–Coxeter algorithm
* the '''Toffoli gate''' aka CCNOT is a 3-to-3 universal reversible gate (all other reversible gates can be constructed from it). there is no smaller universal set of reversible gates (the only reversible gates in 1 or 2 inputs are identity, NOT, and CNOT).
* Tomasulo's AlgorithmRemember
* Tonelli-Shanks Algorithm
* The '''Toom-Cook Algorithm''' multiplies two ''n''-digit numbers using ''n<sup>log(5)/log(3)</sup>'' single-digit mults
* Tupper's self-referential formula
* Turing Degree
* '''Turing Machines''' were used to prove the undecidability of the Entscheidungsproblem in 1936, and have persisted as a rather less elegant model of computation than Church's λ-calculus.
* the '''Turing Test''', originally the "imitation game", was proposed by Turing as a means of evaluating conversational artificial intelligence via questions-and-answers on a text channel. Its use as a diagnostic is debatable at best.


XDP has some similar problems, and requires a good amount of boilerplate from the XDP program if all kinds of problems are not to be introduced. As the simplest example, a host will not normally deliver a payload to a userspace socket unless the packet was addressed to some address on the host. An XDP program forwarding to XSKs must perform this check itself (and there is no obvious way to access [[netlink]]-style stack details from an XDP program). <tt>rp_filter</tt> usually provides reverse path filtering as described in RFC 3704, but it is not applied to XDP. If a NIC is in promiscuous mode, frames will be delivered to XDP no matter their L2 destination address, etc.
* Ukkonen's Algorithm


* There seems no way to determine whether UDP and TCP checksums have been validated in hardware (there <i>are</i> methods for checksum deltas when modifying packets). If they have not, I usually want to validate them myself before passing packets to userspace, but if they have, I don't want to incur that cost. If a copy must be made of the packet data, I'd like any checksumming folded into that, where it will likely be hidden under memory access costs.
* Valiant-Vazirani Theorem
* Van Jacobson Channels
* Van Wijngaarden Grammars
* Verhoeff Algorithm
* Viola-Jones face detection
* Viterbi algorithm
* Volder's algorithm


===Small annoyances===
* Wagner-Fischer Algorithm
* Binding an XDP program effectively cycles the device on some NICs.
* Wallace Multiplier
* I can't determine what class of networking device I've been bound to from within my XDP program. Ought I expect Ethernet L2? Who knows!
* Wallace tree
* The <tt>rx_fill_ring_empty_descs</tt> statistic seems to come preloaded with a value of 1. lol?
* Warnsdorff's Algorithm
* You can't generally take advantage of hardware offloading (LRO/TSO) in conjunction with XDP, though it seems you (sometimes) can with frag-aware XDP (read on...).
* '''Welford's Algorithm''' is a stable online algorithm for computing mean and estimated variance
* How, oh how do I get hardware timestamps? <tt>SO_TIMESTAMP[NS]</tt> is sadly unsupported on <tt>AF_XDP</tt>.
* The '''Williams State Machine''' is a common [https://vt100.net/emu/dec_ansi_parser parsing automaton] for DEC virtual terminal input
* Winograd's Algorithm
* Witten-Bell smoothing
* Wu's Line Algorithm
* Wu-Manber Algorithm
* Wyllie's List Ranking


===Mere technical issues===
* Yao's Principle
* XSKs must bind to a specific NIC hardware queue. The APIs to get hardware queue information are old [[ethtool]] <tt>ioctl</tt>s, or the more recent netlink reimplementations of same. There are at least four types of hardware queue, dependent on hardware and driver. The APIs to *manage* hardware queues are barely there, yet to use XDP one absolutely must either (a) collapse all RX queues into a single queue or (b) direct all desired traffic to the XDP-bound queue with a NIC ntuple rule or (c) bind XDP programs to all RX queues. Per-queue statistics are completely NIC-dependent and unstructured with no unifying infrastructure despite near-universal support for basic per-queue stats. These are all really variations on the theme that "kernel-side ethtool seems to have been implemented by a drunken goldfish".
* '''Yeh's Algorithm''' is a two-level adaptive training algorithm designed by Yeh and Patt in 1991. A branch history register is used to maintain branch behavior for a specific pattern of branch history, and 4-bit counters are used for each BTB set.


* If I've got a pool of workers, each with their own XSK, I'd often like to distribute packets to XSKs based on dynamic backlog, and I *never* want to dispatch to an XSK whose ringbuffer is full. The XSK abstraction offers no way to do this (you could build it yourself with eBPF maps).
* Zhu-Takaoka Algorithm
 
* Zimmermann-Sassaman key-signing protocol
* I ought be able to have all my rings backed by huge pages if I so desire, but this can't be accomplished with kernel-allocated rings as used with XSKs (the larger UMEM is allocated in user space, and can (should) use huge pages).
* Zobrist hashing
 
* Running libxdp-based programs under [[valgrind]] results in all kinds of illegal access errors being thrown, discomforting regarding such a low-level component. Also, if <tt>xdp-loader</tt> crashes while holding its filesystem-based lock, it can't be used again until the lock is deleted, even if the PID recorded therein no longer exists.
 
===Deeper problems===
* Though the infrastructure is there suggesting that multiple XDP applications can easily coexist on an interface, it's something of a charade. <tt>xdp-loader</tt> gives you a basic chaining infrastructure, sure, but take the checksum example above. In the absence of hardware checksums (and the ability to detect that they've been validated), must each XDP program validate? Must each XDP program check for L3 well-formedness? If they need defragmentation, must all programs carry that code? It seems to me that eBPF is sufficiently limited that the kernel ought be able to weave together various XDP programs, warn "this one will never match because its matches are all eaten by this already-loaded program", etc. Even that would probably be a mess. Until then, though, I think <tt>xdp-loader</tt>'s default policy of chaining is misguided.
 
* The jumbo frame support is a goddamn mess. Generally, you can't run XDP on an MTU larger than your page size less about a thousand bytes (3050 is typically as high as one can go on 4KiB pages). This effectively shoves an atomic bomb right up the ass of many high-speed networking setups. Do many people use Ethernet MTUs larger than 1500? No. Do many people who are interested in high-performance networking? Absolutely. Some drivers are rumored to support "multibuf"-based jumbo frames, but there's no easy way to discover whether you're working with such a driver. The best you can do seems to be setting the MTU high, setting the <tt>BPF_F_XDP_HAS_FRAGS</tt> flag on the <tt>struct bpf_program</tt>, and giving it the ol' college try. If it does load, it doesn't seem that <tt>XDP_OPTIONS_ZEROCOPY</tt> can be used, and your XDP program must use the "frag-aware API" if it's to access packet data in secondary fragments. Give me my 8K MTUs back!
 
* Locally-generated packets generally don't hit XDP unless you're binding to loopback. I.e. if I have an Intel X540 with an IP address of 172.16.88.40/24 at <tt>ixgbe0</tt>, and I bind an XDP program to it, and I ping 172.16.88.40 from that same machine, an XDP program bound to <tt>ixgbe0</tt> is <i>not</i> going to see that traffic, while XDP bound to <tt>lo</tt> <i>will</i>. This contradicts how local addresses typically work, requiring either that one explains the strange restriction to users (bonne chance!), bind to both devices (requiring two XDP programs and two sets of XSKs), or that one build an alternate path using regular sockets to handle this case.
 
==Executive summary==
XDP is mad decent, especially as DPDK gives me a terrible rash. With that said, it's by no means beautiful, and has a number of serious problems. It is easier to achieve peak rates with DPDK in most cases, <i>so long as you needn't use other kernel infrastructure</tt>, which is entirely bypassed.</i> Vendor DPDK sucks complete ass, because you <i>will</i> eventually need some very basic functionality that would normally be only an obscure [[iproute]] invocation away, whereas you will have to get your shitty vendor involved to customize their crap, and it will not be cheap. If you need transmit in addition to receive, use either XDP's TX functionality or [[io_uring]] with batched sends.
 
==One last thing==
DPDK lives on github at [https://github.com/DPDK/dpdk DPDK/dpdk] like every other reasonable project in existence, resting snugly in the loving bosom of Microsoft, somehow making us money (<i>disclosure: Microsoft has for several years now compensated me handsomely despite forthright sentiments like "Windows 11 is the worm-rotted cherry atop three decades of unceasing crapwaffle dogshit joke operating systems from Redmond. Anyone with half a brain in their head runs Linux, unless they run FreeBSD. Those unfortunate minutes of my day unwillingly spent in Outlook make me want to vomit. The other day there was a motherfucking movie advertisement in my "Start menu". Why anyone tolerates our garbage is a complete mystery to me, aside of course from the best-of-breed space/satellite service offerings due Microsoft Orbital. Kudos, Microsoft Orbital! Kudos to your handsome and stalwart maldevs, your gracious and skilled ladycoders, and your marvelous radomes! PS boss, if you're reading this, I need my laptop replaced yesterday."</i>).
 
When I sent a patch in to bring the XDP documentation up-to-date with the kernel's structure definitions, I was told to [https://patchwork.kernel.org/project/netdevbpf/patch/20230402084120.3041477-1-dankamongmen@gmail.com/ modify my git-diff] output and mail a different list. I mean, I get it, and I'm not going to tell you how to run your networking mailing list, but if this was github, that change would be in and I'd not be thinking about what's possibly broken about my <tt>git-diff</tt>.
 
'''previously: "[[A_Rack_of_One%27s_Own|a rack of one's own]]" 2023-03-11'''
 
[[Category:Blog]]

Latest revision as of 12:13, 8 October 2025

Computer science needs more eponyms, in the vein of Mordenkainen. Collect them all, and impress your friends! I might make a project one day of summarizing these entries.

Explicitly not included in this list are: general logic (Peano and Presburger arithmetic, Herbrandization), mathematical entities not primarily associated with computer science (Markov's inequality, Chapman-Kolmogorov equation, Young tableaux), physical theories to which computer science is merely applied (Navier-Stokes equations, Taylor-Couette flow), nor statistical entities not primarily associated with computer science (Ziph's Law, Pareto efficiency). Explicitly included are: terms from computer engineering (Mead-Conway rules, Ling adders).

Of course, it can't be on the list unless I know about it, so feed me eponyms.

UPDATE the threshold for inclusion is now: De Morgan's Laws. If you're not at least as computer sciency as De Morgan's Laws, you ain't gettin' in. Dank 12:25, 3 October 2011 (CDT)


  • Aanderaa–Rosenberg Conjecture suggests that non-trivial monotonicity properties of undirected graphs can only be solved by Ω(N2) algorithms on N vertices (these are all evasive decision trees on all possible edges)
  • Adam7 Algorithm is a 2D, 7-pass interlacing scheme optionally used by PNG due to Adam Costello
  • the Adler-32 checksum trades reliability for speed relative to CRCs of the same length, and is included in Mark Adler's zlib
  • Adleman's Theorem states that P/poly contains all problems solvable in randomized polynomial time
  • Adelson-Velskii-Landis Trees are self-height-balancing binary search trees, optimizing for lookup over modification viz. red-black trees
  • Aho-Corasick Algorithm extends the Knuth-Morris-Pratt automaton to match multiple strings in one pass of a text
  • Akra-Bazzi Method generalizes the "master method" of Bentley, Haken, and Saxe for subproblems of significantly different size
  • Amdahl's Law
  • Andersen's Algorithm
  • Angluin's algorithm
  • Arikan's PAC Codes aka polarization-adjusted convolutional polar coding outperform CRC-aided and purely convolutional polar codes, approaching the theoretical channel capacity for short blocklengths.
  • Armstrong's axioms are a set of inference rules which generate all functional dependencies of a relational database. Similarly, an Armstrong relation satisfies all the functional dependencies in the closure F+ (and only those dependencies).
  • Backus-Naur Form
  • Bajard-Kla-Muller algorithm
  • Ball-Larus Heuristics
  • the Banerjee test can demonstrate the absence of control flow dependencies in certain types of loops
  • Barendregt convention
  • Barendregt-Geuvers-Klop Conjecture
  • Barnes-Hut simulation
  • the Barton-Nackman trick is an idiom in C++ effecting restricted template expansion
  • Baskett, Chandy, Muntz and Palacios network
  • Batcher's Odd-Even Merge
  • Bayer Filter mosaics arrange RGB color filters on a square array of photosensors, and are used in a majority of single-chip image sensors. It uses twice as many green sensors as red or blue, to mimic the physiology of the human eye
  • Bélády's algorithm is the theoretically best cache-replacement algorithm, one which discards information that will not be needed until the furthest time into the future (this is not usually knowable)
  • Bélády's anomaly is the phenomenon in which increasing the number of page frames results in an increase in the number of page faults for certain memory access patterns, especially when using FIFO page replacement
  • Bell-La Padula model
  • the Bellman Equation specifies for a problem the necessary condition for optimality of dynamic programming
  • Bellman-Ford Algorithm
  • Beneš network
  • Bentley-Ottman Algorithm
  • Berlekamp-Massey Algorithm
  • Berman–Hartmanis conjecture
  • Bernstein chaining
  • Bernstein conditions
  • Biba Integrity Model
  • Blinn-Phong shading
  • Blom's Scheme
  • Bloom filter
  • Bluestein's FFT
  • Blum's axioms
  • Blum's Speedup Theorem
  • Blum-Blum-Shub random number generator
  • Boehm-Demers-Weiser garbage collector
  • the Boolean data type takes on values of true or false, as do variables in George Boole's algebra
  • Booth's Algorithm
  • Borůvka's Algorithm
  • Bowyer-Watson Algorithm
  • Boyer-Moore Algorithm
  • the Brassard-Høyer-Tapp algorithm solves the collision problem on a quantum computer in O(n) queries
  • Bremermann's Limit
  • Brent's Adder is logn + O(log1/2n) depth and O(nlg n) size
  • Brent's Algorithm detects cycles using two pointers, and finds the length of the cycle directly
  • Brent's Method is a hybrid root-finding algorithm combining bisection, the secant method, and inverse quadratic interpolation
  • Brent's Theorem aka Brent's Law states that p < N processors can simulate N in Tp ≤ TN + (T1 - TN)/p
  • Bresenham's Algorithm
  • Brewer's Theorem
  • Brodal Queue
  • Broder's Method
  • Bron-Kerbosch Algorithm
  • Brooks-Iyengar Algorithm
  • Buchberger Algorithm
  • the Burnside-Dixon Algorithm calculates irreducible representations of finite groups
  • Burrows-Wheeler Transform
  • Buzen's Algorithm
  • Callahan-Koblenz algorithm
  • Cannon's Algorithm
  • Cantor-Zassenhaus Algorithm
  • Carmack's Reverse
  • Catmull-Clark subdivision surfaces
  • Chaff Algorithm
  • Chaitin's algorithm
  • Chaitin's Constant
  • Chaitin-Briggs algorithm
  • Chaitin–Kolmogorov random numbers
  • Chakravala's Algorithm
  • Chan's Algorithm computes the optimal h-point convex hull of n 2- or 3-dimensional points in O(nlgh)
  • Chandy-Lamport Algorithm
  • the Chang-Roberts Algorithm elects leaders for distributed systems.
  • Chen's Algorithm is an exact quantum algorithm for testing 2-junta
  • Chen's Algorithm is a single-writer, multiple-reader, wait-free lock using Compare-and-Swap
  • the Chen-Teboulle Algorithm solves the proximal point algorithm efficiently for certain functions
  • Cheney's Algorithm
  • Chew's Second Algorithm
  • Chien search
  • Cholesky decomposition expands Hermitian positive-definite matrices into products of a lower triangular matrix and its conjugate transpose. solved using the Cholesky–Crout and Cholesky–Banachiewicz algorithms.
  • Chomsky Hierarchy
  • Chomsky Normal Form
  • Chomsky-Schützenberger theorem
  • Christofides Algorithm
  • Church encoding
  • Church-Rosser Theorem
  • Church-Turing Thesis
  • the Clifford Device exploits if(0) to abstract block control via macros (note that e. g. N3355 calls this "Claire's Device" following a presumed transition, but Claire still seems to call it Clifford).
  • Clos network
  • Cobham Axioms
  • Cobham's thesis
  • Cocke-Younger-Kasami Algorithm
  • Cohen-Sutherland algorithm
  • Coffman conditions enumerate the four conditions necessary and sufficient for deadlock within a system (mutual exclusion, hold-and-wait, a lack of preemption, and circular wait)
  • Commentz-Walter Algorithm
  • Conway's Law
  • Cook reduction
  • the Cook-Levin Theorem (sometimes just Cook Theorem) proves that the Boolean satisfiability problem is NP-complete.
  • the Cooley-Tukey Algorithm is the workhorse algorithm for Fast Fourier Transforms.
  • the Coppersmith-Winograd Algorithm multiplied matrices in the least time complexity from 1990-2010, and used the "laser method" employed by all improvements since.
  • Craig, Landin and Hagersten lock
  • Cranfield method
  • (preconditioned) Crank–Nicolson Algorithm
  • Crusader’s Convergence Algorithm
  • Curry-Howard correspondence
  • The CVM algorithm (Chakraborty, Variyam, Meel) approximates the number of distinct elements in a large set
  • Dadda Multiplier
  • Damerau-Levenshtein distance
  • Damm Algorithm
  • Davis-Putnam Algorithm
  • Davis-Putnam-Logemann-Loveland Algorithm
  • De Bruijn presentation
  • De Bruijn string
  • Dekker's Algorithm
  • Delaunay's Triangulation
  • Dennard Scaling
  • Deutsch gate
  • Diffie-Hellman Key Exchange
  • Dijkstra's Algorithm
  • Dinic's Algorithm
  • DiVincenzo's criteria specify conditions necessary for a quantum computer
  • Dolev's Algorithm
  • Doo-Sabin subdivision surface
  • Duff's Device
  • Dyck Language
  • Earle latch
  • Earley Parser
  • Edholm's law predicts doubling of bandwidth every 18 months across wireless, nomadic, and wired networks (and is getting some rather heavy lift from Moore's Law IMHO)
  • Edmonds's matching algorithm constructs maximum matchings on graphs in O(|E||V|²)
  • Edmonds-Karp Algorithm
  • ElGamal encryption
  • ElGamal signatures
  • van Emde Boas trees
  • Sieve of Eratosthenes
  • the Eytzinger layout stores binary trees in an array in a cache-friendly manner
  • Euclid's Algorithm
  • Fagin's Theorem states that the set of all properties expressible in existential second-order logic is precisely the complexity class NP
  • Falk diagrams graph various performance counters against time (typically expressed in cycles)
  • Faugère F5 algorithm
  • Fenwick trees support efficient update of elements and calculate prefix sums in a table of numbers
  • Fiat-Shamir Heuristic
  • Fibonacci Heap
  • Fisher-Yates shuffle
  • Flajolet-Martin algorithm
  • Fletcher's Checksum
  • Floyd's Algorithm
  • Floyd-Steinberg dithering
  • Flynn Taxonomy
  • Ford-Fulkerson Algorithm
  • Fortune's Algorithm
  • Fox's Algorithm
  • Fredkin gate
  • Friedberg-Muchnik Theorem
  • Fruchterman-Reingold heuristic
  • Fürer's algorithm multiplies two n-digit numbers in O(nlgn*2O(lg*n))
  • the Ferguson-Forcade algorithm was the first for the integer relation problem (Bull. Amer. Math 1979)
  • Gabbay's separation theorem
  • Gabow's Algorithm
  • Gal's Accurate Tables
  • Gale-Church Algorithm
  • Gale-Shapley algorithm
  • Gilbert-Johnson-Keerthi Algorithm
  • Girard's Paradox
  • Girvan-Newman Algorithm
  • Givens rotation
  • Glushkov Automata
  • Goldreich-Goldwasser-Halevi scheme
  • The weighted Gomory-Hu Tree of an undirected graph with capacities G represents the minimum s-t cuts for all s-t pairs in G, and is computable via |V|-1 maximum flow problems.
  • Gordon–Newell theorem
  • Gosper's Hack
  • Gosper's Hypergeometric Algorithm
  • Gosper's Loop Detection Algorithm
  • Gouraud shading
  • The Graham Scan solves for the convex hull of a set of points in O(NlgN).
  • The Graham-Andrew Algorithm modifies the Graham Scan to solve for convex hulls in O(N) best case.
  • Graham-Denning Model
  • Gram–Schmidt process
  • Gray codes
  • Greibach Normal Form
  • Grover's Algorithm
  • Grzegorczyk hierarchy
  • Guruswami-Sudan Algorithm
  • Gustafson's Law
  • Gutmann's Method is a 35-phase recipe for destroying data on ferromagnetic drives.
  • Guttman-Rosler transform
  • Hamiltonian path problem
  • Hamming code
  • Hamming distance
  • the Håstad, Just, Lagarias, and Schnorr (HJLS) algorithm improves on LLL for the integer relations problem (SIAM J. Comput. 1989)
  • Heap's algorithm generates all permutations of a set with minimum movement (The Computer Journal 1963)
  • Heckel's algorithm isolates changes between files, and is the basis for diff CACM 1978
  • Hennessy-Milner Logic
  • Herlihy's wait-free hierarchy
  • Hindley-Milner type system
  • Hirschberg's Algorithm
  • Hoare logic
  • Holevo's Theorem
  • Holland's schema theorem
  • Hong-Kung bound
  • Hopcroft-Karp Algorithm
  • Hopfield net
  • Horn clauses
  • Hough transform
  • Householder transformation
  • Huet's Zipper
  • Huffman coding
  • Hunt-McIlroy Algorithm
  • Iliffe vector
  • Immerman–Szelepcsényi theorem
  • Jackson network
  • Jackson's theorem
  • Jaro-Winkler distance
  • Jefferson's Time Warp
  • Jelinek-Mercer smoothing
  • Jensen's Device
  • Johnson's Algorithm
  • the Jonker-Volgenant Algorithm improves Kuhn's Algorithm to solve the assignment problem in O(n³), Jonker-Volgenant 1987
  • Kabsch Algorithm
  • Kadane's Algorithm
  • Kahan Summation Algorithm
  • Kahn's Algorithm topologically sorts a graph in O(|V| + |E|), Kahn 1962
  • Kannan's Theorem
  • Karatsuba's Algorithm multiplies two n-digit numbers using nlog23 single-digit mults
  • Karger's Algorithm
  • Karn's algorithm extracts accurate TCP RTT measures, Karn-Partridge 1987
  • Karmarkar's algorithm
  • Karnaugh map
  • Karp reduction
  • Karp-Flatt metric
  • Karp-Lipton Theorem
  • Kamada-Kawai algorithm
  • Kernighan-Lin algorithm
  • Kirkpatrick-Seidel Algorithm
  • Kleene Closure
  • Kleene Plus
  • Kleene Star
  • Kleene–Rosser Paradox
  • Kneser-Ney smoothing
  • Knuth Shuffle
  • Knuth-Morris-Pratt Algorithm
  • Koenig Lookup
  • Kohonen Algorithm
  • Kohonen network
  • Kolmogorov complexity
  • Koomey's Law
  • Kosaraju's Algorithm
  • Krapchenko's Adder is an improvement over Brent's Adder, linear (3n + 6*2m, m=⌈lg n⌉) in size and logn + O(log1/2n) depth (m + 7(2m)1/2+16, m = ⌈lg n⌉).
  • Kruskal's Algorithm
  • Kryder's Law asserted that areal density doubles every thirteen months (this has not been true for some time). Also known as the Kryder rate.
  • Kuhn's Algorithm (also known as Kuhn-Munkres) solves the assignment problem in polynomial time, Kuhn 1955
  • The [Karush-]Kuhn-Tucker conditions are a set of tests to determine whether an integer programming solution is optimal, Karush 1931 Kuhn-Tucker 1951
  • Kung-Leiserson systolic array
  • Kuroda Normal Form
  • Ladner's Theorem
  • Lamport's Bakery Algorithm
  • Lamport's Logical Clock
  • Lamport's Hash
  • Lamport timestamps
  • Lee-Seung algorithm
  • Lehmer random number generator
  • Lehmer's GCD Algorithm
  • Lempel-Ziv-Welch compression
  • the Lenstra-Lenstra-Lovász (LLL) algorithm was the first for the integer relation problem that supplied proofs (Math Ann. 1982)
  • Levenshtein automaton
  • Levenshtein distance
  • Levialdi's transform progressively and deterministically degrades a bitmap
  • Levin reduction
  • Liang-Barsky algorithm
  • Lin-Kernighan Heuristic
  • Linde-Buzo-Gray algorithm
  • Ling adders
  • Liskov's Substitution Principle
  • Lloyd's algorithm
  • Loop subdivision surfaces
  • Loss-DiVincenzo machines are quantum computers based off electron spin as confined to quantum dots
  • Luby's algorithm
  • Luhn Algorithm
  • Luleå Algorithm
  • Maekawa's Algorithm
  • Mahaney's Theorem
  • Manning algorithm
  • Margolus gate
  • Marzullo algorithm
  • Matiyasevich's theorem proves that every recursively enumerable set is Diophantine, and thus proves that no algorithm exists for Hilbert's tenth problem
  • McFarling-style branch predictor
  • Mead-Conway Rules
  • Mealy machine
  • Mellor-Crummey and Scott lock
  • Merkle–Damgård construction
  • The Metropolis-Hastings algorithm for MCMC obtains samples from a probability distribution that is difficult to directly sample
  • Miller-Rabin Primality Test
  • Minsky-Fenichel-Yochelson Algorithm
  • Montgomery reduction
  • Moore machine
  • Moore's Law
  • Morgensen-Scott encoding
  • Möller-Trumbore algorithm
  • Nagle's algorithm
  • Nassi-Shneiderman diagram
  • Needham-Schroeder Protocol
  • Needleman-Wunsch Algorithm
  • Neuman-Stubblebine Protocol
  • von Neumann architecture aka stored-program architecture keeps instructions in the same memory as data (as opposed to Harvard architecture, which keeps the two distinct). Popularized by von Neumann, but largely based on Eckert and Mauchly's work on the ENIAC.
  • Nevill-Manning algorithm
  • Nick's Class
  • Nielsen's law predicts slower growth for home bandwidth than computing power, suggesting that user experience will remain bandwidth-bound
  • Nielsen's usability heuristics are ten (rather debatable) guidelines forming a usability heuristic for interface design
  • Nisan's Generator
  • Ogden's lemma extends the pumping lemma to context-free languages
  • Otsu's Method is used to perform automatic image thresholding
  • Ousterhout's dichotomy/fallacy is a taxonomy of systems vs scripting languages
  • Otway-Rees Protocol
  • Paeth-Tanaka Algorithm rotates images via a method of three shears
  • Paeth Filter performs 2D image compression in PNG
  • PageRank Algorithm
  • Parikh's theorem shows that a context free language that doesn't consider order of its terminal symbols can be expressed as a regular language, proving the existence of inherently ambiguous CFLs and that CFLs over singleton alphabets are regular. JACM 1966
  • Peterson's Algorithm
  • Petri nets
  • Petrick's method
  • Phong shading
  • Plotkin's Sticky Bit
  • Plouffe's Inverter was an early symbolic inverter for floating point numbers
  • Pollaczek–Khinchine formula
  • Pollard's Kangaroo Algorithm
  • Pollard's ρ Algorithm aka Pollard's rho Algorithm factors integers in running time expected to be proportional to the square root of the smallest prime factor of the number being factored
  • Popek-Goldberg virtualization requirements
  • Post's correspondence problem
  • Post's Lattice is the lattice of all clones on {0,1}, ordered by inclusion. It is used to prove sets of connectives to be functionally complete (e.g. NAND and NOR both generate functionally complete Boolean algebras).
  • Postel's Law
  • Prim's Algorithm
  • Proebsting's Law claims that compiler technology doubles computing power every 18 years
  • Prüfer Coding
  • Prüfer Sequence
  • Quines
  • Quine-McLuskey algorithm
  • Rabin Automata
  • Rabin's Information Dispersal Algorithm
  • Rabin-Karp Algorithm
  • Rader-Brenner Algorithm
  • Radovic-Hagersten lock
  • the Ramer-Douglas-Peucker algorithm decimates a series of line segments to a similar series of fewer line segments (1973)
  • Raymond's Algorithm
  • Reed-Muller code
  • Reed-Solomon correction code
  • Reingold's logspace Algorithm
  • Ricart-Agrawala Algorithm
  • Rice's Theorem
  • Rice-Shapiro Theorem
  • Risch Algorithm
  • Rivest-Shamir-Adleman Algorithm
  • Rocchio's Algorithm classifies information relevance using nearest centroids
  • Ruppert's Algorithm
  • Sattolo's Algorithm generates a 1-cyclic derangement of an array (a permutation such that every element ends up in a new position)
  • Savitch's Theorem
  • Schensted Algorithm
  • Schlick's approximation
  • The Schönhage–Strassen algorithm multiplies two n-digit numbers in O(nlgnlglgn) bit complexity using FFTs
  • Schoof's Algorithm
  • Schreier-Sims Algorithm
  • Schwartzian transform
  • Sethi-Ullman Algorithm
  • Shamir's Secret Sharing Scheme
  • Shamos-Hoey Algorithm
  • Shar's Algortihm is a variation on the uniform binary search of Knuth.
  • Shor's Algorithm
  • Sipser–Lautemann theorem
  • Smith's Algorithm hashes the program counter to n bimodal (saturating) k-bit counters for dynamic branch prediction (1981)
  • Smith-Waterman algorithm
  • Solomonoff-Levin distribution
  • Steensgaard's Algorithm
  • Stehlé-Zimmermann algorithm
  • Steiner tree problems are a class of combinatorial optimization problems involving determining the optimal interconnect of a graph under some objective function.
  • the Steinhaus-Johnson-Trotter algorithm generates all permutations of a set (CACM 1964)
  • Strassen's Algorithm
  • Suurballe's Algorithm
  • Sweeney-Robertson-Tocher division algorithm
  • Tarjan's Algorithm
  • Tarjan's Dynamic Tree
  • Tarjan's Least Common Ancestors Algorithm
  • The nondeterministic Tarski–Kuratowski algorithm produces an upper bound for the complexity of a given formula in the arithmetical hierarchy and analytical hierarchy.
  • Thompson Automata
  • Timsort
  • Toda's theorem
  • Todd–Coxeter algorithm
  • the Toffoli gate aka CCNOT is a 3-to-3 universal reversible gate (all other reversible gates can be constructed from it). there is no smaller universal set of reversible gates (the only reversible gates in 1 or 2 inputs are identity, NOT, and CNOT).
  • Tomasulo's AlgorithmRemember
  • Tonelli-Shanks Algorithm
  • The Toom-Cook Algorithm multiplies two n-digit numbers using nlog(5)/log(3) single-digit mults
  • Tupper's self-referential formula
  • Turing Degree
  • Turing Machines were used to prove the undecidability of the Entscheidungsproblem in 1936, and have persisted as a rather less elegant model of computation than Church's λ-calculus.
  • the Turing Test, originally the "imitation game", was proposed by Turing as a means of evaluating conversational artificial intelligence via questions-and-answers on a text channel. Its use as a diagnostic is debatable at best.
  • Ukkonen's Algorithm
  • Valiant-Vazirani Theorem
  • Van Jacobson Channels
  • Van Wijngaarden Grammars
  • Verhoeff Algorithm
  • Viola-Jones face detection
  • Viterbi algorithm
  • Volder's algorithm
  • Wagner-Fischer Algorithm
  • Wallace Multiplier
  • Wallace tree
  • Warnsdorff's Algorithm
  • Welford's Algorithm is a stable online algorithm for computing mean and estimated variance
  • The Williams State Machine is a common parsing automaton for DEC virtual terminal input
  • Winograd's Algorithm
  • Witten-Bell smoothing
  • Wu's Line Algorithm
  • Wu-Manber Algorithm
  • Wyllie's List Ranking
  • Yao's Principle
  • Yeh's Algorithm is a two-level adaptive training algorithm designed by Yeh and Patt in 1991. A branch history register is used to maintain branch behavior for a specific pattern of branch history, and 4-bit counters are used for each BTB set.
  • Zhu-Takaoka Algorithm
  • Zimmermann-Sassaman key-signing protocol
  • Zobrist hashing