Repository navigation
View Orbit
The process tree as an observatory. A process with children is a star and its children are planets circling it on Keplerian ellipses with the parent at one focus; a planet with children of its own is a star in turn, with moons. Bodies are sized by memory (the volume of a star carries the whole subtree's), ringed by threads, haloed by CPU and GPU use, and coloured by what kind of process they are. Branches that hang off a top-level process (init, kthreadd) become separate solar systems packed around the middle of the scene, and the whole galaxy turns slowly about its memory-weighted barycentre. It is the second view (2).


Orbit shares its layout with Flow: Flow calls the same systems::layout with the motion held at zero.
The honest summary, before the detail: the shape of this view is real (the tree, the sizes, the rings, the glows) and its motion uses the right physics (Kepler's equation, the third law for the period), but the orbits themselves, their radii, eccentricities, orientations and the order of the planets on them, are packing and decoration. Nothing is attracted to anything. This page separates the two.
A hierarchical gravitational system: the Sun with its planets, a planet with its moons, a star with its planets and a distant companion. Hierarchy is what makes the picture work. The process table is a tree (parent and child by ppid), and a tree of dominance is what a hierarchical orbital system is: each body moves under the pull of the one it orbits and, to first approximation, ignores the rest. The approximation that makes the Solar System analysable (each planet moves on a Kepler orbit about the Sun, perturbed only slightly by the others) is the approximation Orbit uses everywhere, to the point of the limit: every child is a test particle that does not affect its parent or its siblings.
The metaphor works for process data in a real sense: memory in the subtree is a plausible measure of how "heavy" a parent is, and a parent with a heavy tree has many children whose lives it dominates. It fails in another real sense: processes do not attract, children do not feel their parent's mass, and a child can outweigh its parent (a shell that launches a 20 GiB process). The view says what it says without pretending otherwise.
The thing Orbit draws is the Keplerian system, and the machine that shows it, the orrery.
- Before Kepler the planets rode circles. Ptolemy's epicycles (see Ptolemy) and Copernicus's heliocentric rearrangement of 1543 both kept them, and Kepler's Mysterium cosmographicum (1596) still tried to nest the five Platonic solids between the planetary spheres.
- Kepler's first two laws appear in Astronomia nova (1609), worked out from Tycho Brahe's observations of Mars. The third,
$T^2 \propto a^3$ , is in Harmonices mundi (1619); several sources give the date of the discovery as 15 May 1618. How he arrived at it is described in the literature as somewhat mysterious. - Newton's Principia (1687) derived all three from an inverse-square attraction, which turned a description of the planets into a consequence of a force. The restriction Orbit uses, bodies that feel their parent and nothing else, is the test-particle limit of that derivation.
- Mechanical models of the heavens are older than the laws. The Antikythera mechanism, recovered from a wreck off the Greek island in 1901, dates from the second or first century BCE and gears the Sun and Moon with some precision. Planetaria with clockwork planets were built in the seventeenth century (Huygens's of 1682 is often cited,
(unverified)here). - The word orrery is English and comes from a title. About 1710 the instrument maker John Rowley of London made a copy of a design by George Graham for Charles Boyle, 4th Earl of Orrery, and the device took his name. Graham had also had a copy made for Prince Eugene of Savoy. A history-of-science museum in Oxford notes that Boyle performed no seminal experiments and has no scientific discovery to his name; his fame rested on his collection of instruments. The name survived the more accurate machines that followed. One source calls the maker James Rowley and another John, and the dates given for Boyle's birth differ by two years (1674 or 1676).
- Orbit keeps the orrery's sins: radii and periods are chosen so the machine fits on a table, not to scale, and the planets never perturb each other.
Kepler (Astronomia nova, 1609; Harmonices mundi, 1619) found, from Tycho's observations of Mars and the planets, that
- each planet moves on an ellipse with the Sun at one focus;
- the line from the Sun to the planet sweeps equal areas in equal times;
- the square of the period is proportional to the cube of the semi-major axis,
$T^2 \propto a^3$ .
Newton (Principia, 1687) derived all three from an inverse-square attraction. For a body of negligible mass in orbit about a mass
For an ellipse of semi-major axis
Let
and the area swept from periapsis is the focal sector of the ellipse,
There is no closed form for
Put capacity in shells.
Ellipses with the same
For orbits about a mass
Hohmann (1925) found the least-energy transfer between two circular coplanar orbits: an ellipse tangent to both, with semi-major axis
| Visual element | Measured quantity (platform source) | Transform | Status |
|---|---|---|---|
| Body (sphere) | one process | impostor of radius mass_radius(subtree memory) * grow
|
measured |
| Parent and child | ppid |
child orbits parent at one focus; children of a top-level process with children of their own become separate systems | measured (macOS: the "responsible" app) |
| Body radius | resident memory of the whole subtree the body anchors (weigh; RSS on Linux, footprint on macOS), eased |
|
measured; saturates at 6.4 GiB |
| Colour | kind: kernel slate, system teal, session amber, container violet (cgroup path markers, PF_KTHREAD; macOS by uid and path); zombie, stopped, blocked override |
kind_color: base times |
measured kind; the brightness jitter is decorative |
| Saturn rings | thread count (/proc/<pid>/stat field 20) |
none below 4; then 1, 2, 3, 4 rings at 4, 16, 64, 256 threads (one more per fourfold); ring |
measured count; the ring's azimuth (hash of the pid) is decorative |
| Warm glow | CPU | when above 1%: radius |
measured |
| Comet trail | CPU | when above 3%: |
measured |
| Green glow and halo | NVIDIA per-process GPU memory (NVML) | glow radius |
measured; absent on macOS |
| Orbit semi-major axis |
none | from packing: shells
|
decorative (layout) |
| Eccentricity |
none |
knuth(parent pid); |
decorative |
| Orbital period | parent's subtree memory and |
the third-law formula above, clamped | derived: heavier tree gives faster children, but clamped and normalised |
| Which shell, which phase | pid order | branches first, then by Identity; evenly spaced in |
decorative (arrival order) |
| System position | none |
Galaxy::place: golden-angle spiral, largest first; then the galaxy turns |
decorative |
| Galaxy turn | enclosed subtree memory |
galactic_period, 120 to 900 s |
derived, clamped |
| Arcs and beams | socket links, connections leaving the machine | as in the other views | measured |
| Spawn and exit | a process appearing or leaving | a child flies out of its parent over 0.9 s; an exit leaves an expanding ring (1.2 s) | measured events |
Orbit is a ViewModule, the Orbits struct in src/views/orbit.rs; its registry row in views::REGISTRY builds it with a closure. It owns a Galaxy (where the systems stand and how they turn) and draws what systems::layout returns; the layout itself, shared with Flow, is in src/views/systems.rs. Orbits::draw calls systems::hubs, then systems::layout, then paint, then Layout::report (tour stops, titles and the popup line of the memory a system holds). Scene holds none of this state.
The tree. layout finds each process's parent among the admitted ones. A process with a parent in the set becomes that parent's child if it is a leaf or its parent itself has a parent; otherwise it becomes a root. So a branch hanging off a top-level process (a service with children under init) is its own system, and the leaves directly under a top-level process stay in orbit around it, which is why kernel threads form one ringed system around kthreadd. Children are ordered by (is a leaf, Identity): branches take the inner shells, then leaves in pid order. Depth is capped by MAX_DEPTH = 3, so four levels are drawn; deeper processes count as collapsed.
Sizes. weigh sums memory and process count over each subtree (Layout::mass for stars). radii follow from mass_radius; reach multiplies the radius by ring_scale(threads) = measure computes each body's extent: a leaf's is its reach; a parent's is the reach returned by shells over its children's extents.
Shells. elements(pid) hashes the parent's pid into shells(body, sizes, e) then packs the children: the first shell's semi-major axis puts periapsis at $a(1-e) = \mathrm{reach}\mathrm{body} + \max(\text{extent}) + 0.6 + 1$; bodies fill a shell in order while $\sum (2,\mathrm{extent}i + 0.6) \le 2\pi a\sqrt{(1-e)/(1+e)}$; the slack is shared out so bodies are evenly spaced in mean anomaly; the next shell's $a$ grows so that the periapsis gap is $\mathrm{extent}\mathrm{widest\ here} + \mathrm{extent}\mathrm{widest\ after} + 0.6$ (divided by shell * 0.5). The test kepler_solution_and_shells_keep_bodies_apart checks Newton's solution, periapsis at
Systems. Galaxy::place needs a disc of radius extent + SYSTEM_GAP (2.5) per root and reserves 1.08 times that; a system keeps its place while its need stays within its reservation and is otherwise placed again with layout::vacant, the first point on a golden-angle spiral (step $\max(0.4R, 1)$) where its disc clears all the others; the largest are placed first, ties by Identity. Systems whose root is hidden by focus or --limit keep their places (test focusing_and_clearing_focus_keeps_every_orbit_system_in_place).
Motion. Walk::branch positions each child at mean = phase + 2π·motion/period(a, parent_mass) and solves Kepler's equation by eccentric_anomaly (six Newton steps from (settled - target) * child_grow with the cubic ease-out of simulation::growth over 0.9 s.
The galaxy. Galaxy::revolve turns the systems about the memory-weighted centroid of the drawn systems' centres, taken when systems come or go. Systems whose annuli galactic_period(radius, enclosed) MAX_TURN_STEP = 2 s of motion, so a pause, a rewind or a view switch never spins it (test the_galaxy_turns_at_one_frame_per_second_but_not_across_view_switches).
Hubs. systems::hubs makes a hollow star (HUB_START identity, an outline, no measurement) for a parent that isotop cannot read (on macOS without root, launchd), so its readable children circle it instead of each standing alone; the legend adds "hollow star = a parent isotop can't read (run with sudo)". A hub neither dies nor splashes.
Time. Orbit passes stage.time as the motion of the layout and steps nothing with stage.dt. Orbits and the galaxy therefore run at the frame clock and stop when it stops.
Drawing. Orbit ellipses are polylines through Frame::trace, one per distinct (centre, positions[id] is the settled target, so labels and the tour do not chase a flying newborn.
CPU/GPU. Spheres, glows, lines: nothing special; the shared display list keeps parity.
Stability. The row waives no property: known_unstable is empty for Orbit. The harness checks the home of each process, the centre of its system, which Orbits returns from ViewModule::anchors (test-only), because the orbit a body travels follows memory and its siblings by design (radii follow memory, the radii size the extents, the extents size the discs). A system is placed again only when its extent outgrows the reservation, which is HEADROOM = 1.3 of what it needs, and that absorbs the harness's changes to memory and population.
What degrades. On macOS: no GPU halos (the legend leaves out "green = NVIDIA GPU"), no D state, hollow stars for unreadable parents, parents by "responsible app". Where cgroups are missing, kind falls back to the platform's own classification. No optional source is declared.
What the demo render shows (--demo --view orbit --width 1600 --output ... --renderer cpu): twelve solar systems, one per demo family (a head process with fifteen children), arranged on a golden-angle spiral with the biggest in the middle. Each has a central star, one or two elliptical shells with its planets spaced round them, planets of visibly different sizes, Saturn-style rings on the more threaded ones, orange-yellow glows (and short comet trails) on the busy ones, thin green ellipses where the demo's fake GPU processes are, and cyan arcs and pink beams crossing between systems. Orbits of different systems have different eccentricities (0.064 to 0.208 for the heads). The PNG carries no labels (they are terminal text laid over the image), so naming a body takes a hover in the terminal.
You can infer
- Who is whose child, from which star a planet circles, and who has the deepest subtrees, from the number of moons.
- Memory, from the radius (cube root: 5.5 times the width for 1 GiB over 6 MiB), and how much a star's whole system holds, since a star's size is its subtree's.
- Thread counts, as ring counts.
- CPU, from the glow and the trail; GPU use, from green.
- Relative period by shell: inner shells turn faster, as Kepler says, and heavier parents turn their children faster, within the clamps.
You cannot infer
-
Anything from orbital radius.
$a$ is the packing of siblings (their sizes), not a measurement; a large$a$ means many or big siblings inside it. - Anything from eccentricity or orientation. A hash of the parent's pid.
- Anything from the angular position of a planet. Evenly spaced by construction; the shell's phase is arrival order.
- The speed of a planet as CPU. Motion is orbital mechanics, not activity. Activity is the glow.
-
Speed differences among kernel threads.
kthreaddholds no resident memory, so its tree's mass is floored to 1 MiB and every shell has the clamped period 600 s (see the table): the system turns once in ten minutes whatever it does. The same happens to any near-empty parent. - Mass in the physical sense. The "mass" is a proxy (memory), the third law is only a layout rule.
- Dynamical stability. Nothing perturbs anything; nothing can collide inside a system or between systems, by construction.
Period table.
| parent subtree memory | ||||
|---|---|---|---|---|
| none (floor 1 MiB) | 679 → 600 | 2956 → 600 | 7590 → 600 | 21466 → 600 |
| 16 MiB | 170 | 739 → 600 | 1897 → 600 | 5367 → 600 |
| 64 MiB | 85 | 370 | 949 → 600 | 2683 → 600 |
| 512 MiB | 30 | 131 | 335 | 949 → 600 |
| 4 GiB | 10.6 | 46 | 119 | 335 |
| 6 GiB (a demo family) | 8.7 | 37.7 | 96.8 | 274 |
For the demo's twelve families (subtree 4.2 to 6.6 GiB, shells at shells, period and the placement, whose layout I compared against the render by eye: the same twelve systems with one or two shells each in the same arrangement; the sub-pixel numbers are from the port, not the binary). A system with no memory to speak of, such as kernel threads, sits on the 600 s clamp in every shell.
Resolution. Orbit sizes are in world units, drawn at the camera's zoom; a 6 MiB process has radius 0.44 and is at least 3.5 pixels (MIN_BODY_PX) for glows; the sphere itself can be a few pixels wide on a large machine. Of the hundreds of processes in a real session only four levels are drawn.
./target/release/isotop --demo --view orbit
./target/release/isotop --demo --view orbit --width 1600 --output orbit.png --renderer cpu
./target/release/isotop --demo --view orbit --time 40 --output orbit40.png # the same layout, later in the planets' motion
./target/release/isotop --view orbitKeys: 2 selects it; click a body for its inspector (memory of the system it anchors, socket counts, command line, parent, cgroup); f focuses a body and its descendants (the system turns about itself); l toggles labels; c cycles links. The hollow-star case needs macOS without root.
-
src/views/orbit.rs:Orbits,Orbits::draw,paint,gpu_note; testsfocusing_and_clearing_focus_keeps_every_orbit_system_in_place,leaves_stay_in_orbit_and_systems_keep_clear_of_each_other. -
src/views/systems.rs(shared with Flow):layout,Layout,Layout::report,Galaxy,Galaxy::place,Galaxy::revolve,Walk::branch,hubs,weigh,measure,shells,elements,period,galactic_period,eccentric_anomaly,Orbit(point,at),rings,ring_scale,whole_roots, constantsMAX_DEPTH,ORBIT_GAP,SYSTEM_GAP,HEADROOM,MAX_TURN_STEP; testskepler_solution_and_shells_keep_bodies_apart,sizes_span_memory_and_stars_carry_their_systems_mass,overlapping_rings_turn_together_and_detached_systems_turn_slower,the_galaxy_turns_at_one_frame_per_second_but_not_across_view_switches. -
src/render.rs:mass_radius,MIN_BODY_PX,Frame::trace. -
src/layout.rs:vacant,spiral,GOLDEN_ANGLE. -
src/palette.rs:kind_color,KERNEL,SYSTEM,SESSION,CONTAINER. -
src/simulation.rs:growth. -
src/views.rs: theorbitrow (LinkRule::All,Backdrop::Space); the legend isOrbits::legend. - Figure script:
docs/figures/orbit-system.py.
- A real transfer for births. Give a newborn a Hohmann-style transfer ellipse from the parent's surface to its shell, so the arrival is a Kepler arc and not a straight line.
-
Meaningful
$a$ . Put a measured quantity on the semi-major axis instead of the packing: wall-clock age (Process::startedexists), or CPU time, so that old processes orbit far. The shells would then be a time axis. -
Real
$N$ -body. Integrate the system with a symplectic scheme (leapfrog, Wisdom-Holman) with memory as the mass. The hierarchy would stay stable only if inner periods are much shorter than outer ones; what is the right "stability radius" for a tree of processes? Mardling and Aarseth's criterion for hierarchical triples is the place to start. - Resonances. Choose shell radii so that adjacent periods are in small integer ratios (2:1, 3:2). Real systems lock into them; here it would be a pure visual rhyme.
- Flat rotation curve. The galaxy's angular speed falls outwards as a Keplerian one; real galaxies' rotation curves are flat (Rubin and Ford 1970). A flat curve is also easy to implement and would stop the outer systems lagging.
-
Open: the clamp to 600 s makes the third law invisible for most real systems. Is a logarithmic compression of
$\sqrt{M}$ a better way to keep the ordering legible?
- J. Kepler, Astronomia nova (1609) and Harmonices mundi (1619).
- I. Newton, Philosophiae naturalis principia mathematica (1687).
- W. Hohmann, Die Erreichbarkeit der Himmelskörper (Oldenbourg, 1925).
- J. M. A. Danby, Fundamentals of Celestial Mechanics, 2nd ed. (Willmann-Bell, 1988).
- C. D. Murray and S. F. Dermott, Solar System Dynamics (Cambridge University Press, 1999).
- R. A. Mardling and S. J. Aarseth, "Tidal interactions in star cluster simulations", Monthly Notices of the Royal Astronomical Society 321 (2001), 398 (unverified page range).
- V. C. Rubin and W. K. Ford Jr., "Rotation of the Andromeda Nebula from a spectroscopic survey of emission regions", The Astrophysical Journal 159 (1970), 379-403.
- Theory Stable Layout for the layout invariant that the waived properties qualify.
isotop — maximalism for its own sake. Source: tfpickard/isotop. This wiki is published from wiki/ in the repository; edit it there. This footer is decorative.
Philosophy · Gallery · Glossary
Theory
Overview
Sampling: Linux
Sampling: macOS
Background sampler
Model and rates
Life events
History
Journal
Scene and display list
Camera and projection
Rasterization
GPU and parity
Picking
Terminal graphics
Stable layout
Determinism
Simulation toolkit
Colour
Text safety
Mathematics
Fourier epicycles
Wave equation
Flocking
Spatial hashing
Stellar photometry
Lorentz and Schlegel
Reaction-diffusion
Spiking neurons
Schwarzschild
Views
City · Orbit · Ripple
Flow · Cores · Cells
Strata · Globe · Reef
Coop · Matrix
Ptolemy · Tesseract
Necropolis · Cortex
Horizon · Murmuration
Arbor · HR
Hive · Switchboard
Armorial · Lights
Planned
Mold · Chamber
Anthill · Plumbing
Morph · Ouija
Canyon · Die
Guides
Writing a view
Recipes
Headless renders
Contributing to the wiki