Notes 1.1.2One address, one selected memory locationRead and write transactions select the same addressed byte but reverse the data direction.Open full sizeSave editable SVG
Notes 1.3.2A binary numeral is a weighted sumThe same value is decomposed into binary weights and reconstructed by repeated division.Open full sizeSave editable SVG
Notes 1.4.2Byte order changes placement, not the valueLittle-endian and big-endian store the same four-byte number at increasing addresses.Open full sizeSave editable SVG
Notes 1.4.7Where translation and execution happenCompiled, interpreted and bytecode execution place translation and the runtime at different stages.Open full sizeSave editable SVG
Notes 1.2.5Two paths, one directory-tree destinationAbsolute paths begin at root; relative paths start at the current working directory.Open full sizeSave editable SVG
Notes 1.1.3The instruction pointer controls the next stepFetch advances the instruction pointer; a taken jump replaces its value.Open full sizeSave editable SVG
Notes 1.2.13Permission bits form three octal digitsOwner, group and other permission triplets map read, write and execute to weights 4, 2 and 1.Open full sizeSave editable SVG
Notes 1.2.6, 1.2.7From command text to argument stringsQuoting preserves a single argument while an unquoted filename pattern expands into matching names.Open full sizeSave editable SVG
Notes 1.2.11Standard streams are independent routesA pipeline joins output to input, while diagnostics have their own route.Open full sizeSave editable SVG
Notes 1.4.2The same bits have two interpretationsA four-bit wheel shows modular arithmetic and the signed boundary; negation inverts and adds one.Open full sizeSave editable SVG
Notes 2.6.4, 2.6.5Index an array; name a record fieldAn array has homogeneous indexed components; a record has named fields that can have different types.Open full sizeSave editable SVG
Notes 2.2.2, 2.2.8Assignment replaces a stored valueA three-step swap preserves the first value in temporary storage before overwriting it.Open full sizeSave editable SVG
Notes 2.11.5Search chooses one subtree at each comparisonA search for an absent value ends at the null child link where insertion can attach a node.Open full sizeSave editable SVG
Notes 2.11.2Hanoi splits one task into three tasksMove the smaller tower away, move the largest disk, then move the smaller tower onto it.Open full sizeSave editable SVG
Notes 2.10.6A pointer to the incoming link unifies deletionThe cursor identifies a pointer cell, so deletion updates either the head or a predecessor link by the same operation.Open full sizeSave editable SVG
Notes 2.10.4Prepend without losing the old listAllocate and initialize a new node, link it to the old head, then replace the head pointer.Open full sizeSave editable SVG
Notes 2.2.10, 2.2.11Test before the body or after itWhile can execute zero times; repeat always executes its body before testing its termination condition.Open full sizeSave editable SVG
Notes 2.3.7Recursive calls postpone work until returnPrinting digits after the recursive call uses suspended frames to restore their original order.Open full sizeSave editable SVG
Notes 2.10.5One arrival sequence, two removal ordersStack operations use one end; queue insertion and removal use opposite ends.Open full sizeSave editable SVG
Notes 2.3.4Copy a value or name the caller storageValue parameters have independent local storage; variable parameters denote the original variable.Open full sizeSave editable SVG
Notes 3.2.8Multiply widens; divide splits the resultThe one-operand i386 forms use EDX:EAX as a double-width product or dividend.Open full sizeSave editable SVG
Notes 3.2.5Effective address combines three termsA matrix element address combines its base, row displacement and scaled column index; LEA only computes it.Open full sizeSave editable SVG
Notes 3.5.1, 3.5.2Macro expansion happens before program executionA macro call expands to push, call and cleanup instructions; the CPU runs the resulting instructions.Open full sizeSave editable SVG
Notes 3.2.13Copy backward when the destination overlaps aboveA forward overlapping copy destroys unread input; backward order preserves it.Open full sizeSave editable SVG
Notes 3.2.1Register names overlap the same bitsEAX, AX, AH and AL select nested or adjacent portions of one 32-bit register.Open full sizeSave editable SVG
Notes 3.2.7, 3.2.9The comparison is the same; the chosen flags differCMP sets flags from subtraction, and signed and unsigned branches interpret them differently.Open full sizeSave editable SVG
Notes 3.3.5, 3.3.6, 3.3.7EBP anchors one invocation while ESP movesArguments, return address, saved frame pointer and locals occupy fixed offsets in an i386 frame.Open full sizeSave editable SVG
Notes 3.7.5An unresolved symbol pulls in an archive memberResolving one reference can introduce another dependency while unused archive members remain excluded.Open full sizeSave editable SVG
Notes 3.6.4, 3.6.5A syscall enters through an OS-defined gateThe historical Linux i386 int 80h ABI carries a write request into a privileged handler and returns a result.Open full sizeSave editable SVG
Notes 3.8.2, 3.8.3x87 pushes change TOP, not every stored valuePhysical register contents stay in place while logical ST names rotate with TOP.Open full sizeSave editable SVG
Notes 4.3.14; 4.10.1Reallocation must preserve the original pointerFor a positive new size, a failed realloc leaves the original allocation valid.Open full sizeSave editable SVG
Notes 4.3.13; 4.9.1Pointer arithmetic counts elementsArray layout and pointer types determine the size of one step.Open full sizeSave editable SVG
Notes 4.5.4Inorder traversal: left, node, rightRecursion stores the return position; an explicit stack must store it as data.Open full sizeSave editable SVG
Notes 4.9.3A callback combines reusable traversal with private stateThe service passes userdata unchanged; the callback knows its actual type.Open full sizeSave editable SVG
Notes 4.5.2; 4.9.2Delete a node by changing its incoming linkA pointer-to-pointer works for both the head and a next field inside a node.Open full sizeSave editable SVG
Notes 4.3.19A pointer to a literal is not a character arrayInitialization can create a separate mutable array or an address of literal storage.Open full sizeSave editable SVG
Notes 4.3.11Pointer assignment and value assignmentAn address is a value; the pointer and its target are separate objects.Open full sizeSave editable SVG
Notes 4.7.1; 4.7.2; 4.7.3Declarations compile; definitions linkThe implementation includes its own public header so the compiler can check both sides.Open full sizeSave editable SVG
Notes 4.3.18A C string ends at its first zero byteStorage capacity, string length, and binary data length are different quantities.Open full sizeSave editable SVG
Notes 4.5.1Structure layout includes paddingOne illustrative ABI: char alignment 1, int alignment 4; actual layout is implementation-dependent.Open full sizeSave editable SVG
Notes 5.2.3; 5.3.4File descriptors are references, not file positionsdup and fork can create several descriptor references to one open-file description.Open full sizeSave editable SVG
Notes 5.3.6; 5.3.7Termination and reaping are separate eventsA zombie has finished executing; it retains status until the parent collects it.Open full sizeSave editable SVG
Notes 5.3.4; 5.3.5fork creates a process; exec replaces its programParent and child continue independently after fork. A successful exec never returns to the old program.Open full sizeSave editable SVG
Notes 5.2.7Mapped addresses provide another view of file bytesMAP_SHARED and MAP_PRIVATE differ when a process writes through a mapping.Open full sizeSave editable SVG
Notes 5.2.1Names lead to inodes; open files can outlive namesHard links share an inode. A symbolic link stores a pathname of its own.Open full sizeSave editable SVG
Notes 5.2.2Read, write, execute: three bits per classMode 754 grants rwx to the owner, r-x to the group, and r-- to others.Open full sizeSave editable SVG
Notes 5.3.15Pipe EOF depends on every writer referenceA reader first drains buffered bytes; it sees EOF only after the last write end closes.Open full sizeSave editable SVG
Notes 5.3.10Redirection rewires a descriptor before execThe new program still writes to descriptor 1; the shell chooses what descriptor 1 refers to.Open full sizeSave editable SVG
Notes 5.3.14Check and wait must be one atomic handoffBlocking a signal preserves an early notification until sigsuspend temporarily unblocks it.Open full sizeSave editable SVG
Notes 5.4.2A terminal targets its foreground process groupA session contains groups; a foreground pipeline is one job even when it has several processes.Open full sizeSave editable SVG
Notes 6.2.4; 6.3.3; 6.3.4Datagrams preserve boundaries; streams preserve byte orderThe sizes returned by TCP reads need not match the sizes of the sender's writes.Open full sizeSave editable SVG
Notes 6.2.6DNS distributes authority through a name hierarchyThe resolver queries each authority. Dashed links show delegation; cached answers can skip this path.Open full sizeSave editable SVG
Notes 6.2.1; 6.2.3Each lower layer carries the unit above itAn IP packet crosses different links; each hop uses the frame format appropriate to that link.Open full sizeSave editable SVG
Notes 6.2.3; 6.3.2Network byte order is most significant byte firstConversions preserve the numeric value while choosing the byte representation required by the protocol.Open full sizeSave editable SVG
Notes 6.2.4; 6.3.4One server port supports many connected socketsA connection is distinguished by both endpoints, not by the server port alone.Open full sizeSave editable SVG
Notes 6.1.2; 6.2.3The longest matching prefix selects the routeA default route matches every IPv4 destination; a more specific matching route takes priority.Open full sizeSave editable SVG
Notes 6.4.3; 6.4.4Wait for readiness, then do bounded workRebuild descriptor sets every iteration; select overwrites them with the ready subsets.Open full sizeSave editable SVG
Notes 6.3.4A listener and its accepted sockets have different jobsaccept returns another descriptor, leaving the listening socket ready for further connection requests.Open full sizeSave editable SVG
Notes 6.4.5Frame complete lines before advancing the sessionKeep a separate input buffer and dialogue state for every connected client.Open full sizeSave editable SVG
Notes 6.2.4; 6.3.4Connection establishment exchanges sequence numbersSimplified successful TCP opening: the handshake is transport setup, before application dialogue.Open full sizeSave editable SVG
Notes 7.1.3; 7.1.5Testing and claiming must be one operationSeparate test/store lets two threads enter; an atomic exchange grants only one owner.Open full sizeSave editable SVG
Notes 7.2.5A haircut needs both admission and completion signalsFour semaphore handshakes coordinate a waiting client, work-chair preparation and completion.Open full sizeSave editable SVG
Notes 7.2.1Reserve the buffer resource before taking its mutexCorrect producer/consumer ordering permits progress; waiting for space while holding the mutex deadlocks a full buffer.Open full sizeSave editable SVG
Notes 7.1.2Lock the whole invariantA transfer protects both reads and writes; a report can compute privately after a consistent copy.Open full sizeSave editable SVG
Notes 7.4.3; 7.4.4; 7.4.5File-lock lifetime follows its ownership modelBSD-style flock belongs to an open file description; traditional POSIX record locks belong to a process and file.Open full sizeSave editable SVG
Notes 7.1.1A read-only scan can still raceA summation mixes destination-before-transfer with source-after-transfer and loses the transferred amount.Open full sizeSave editable SVG
Notes 7.1.1Two increments, one lost updateInterleaving two read-modify-write increments overwrites a completed update.Open full sizeSave editable SVG
Notes 7.1.3Peterson: the last contender yieldsWith both intent flags true, the last store to who_waits selects the waiting participant.Open full sizeSave editable SVG
Notes 7.2.2A full pipe can turn wait-before-read into deadlockParent waits for child termination while the child is blocked writing to a full pipe that only the parent can drain.Open full sizeSave editable SVG
Notes 7.2.4Reader overlap can keep a writer waitingContinuous reader cohorts can starve a writer; an admission gate prevents new readers extending the current cohort.Open full sizeSave editable SVG
Notes 7.2.2; 7.2.3A global lock order breaks circular waitOpposing resource orders form a deadlock cycle; requiring lower then higher removes that possibility.Open full sizeSave editable SVG
Notes 7.1.6A semaphore counts unclaimed permitsTwo permits are consumed; a third participant waits until a posted permit can be consumed.Open full sizeSave editable SVG
Notes 8.4.6A buffer can combine writes and satisfy readsA cached block is updated twice and read between updates; only the latest dirty version need be physically written.Open full sizeSave editable SVG
Notes 8.2.1; 8.3.3A context switch changes which saved state runsThe scheduler saves task A registers, selects task B and restores its execution state and address-space context.Open full sizeSave editable SVG
Notes 8.3.2; 8.3.5A recoverable page fault restarts the instructionAccess to a valid nonresident page faults; the kernel obtains the page, installs the mapping and resumes the faulting instruction.Open full sizeSave editable SVG
Notes 8.4.10; 8.3.5Virtual contiguity does not imply physical contiguityFour adjacent virtual pages map to nonadjacent physical frames, so a simple contiguous DMA range cannot describe them.Open full sizeSave editable SVG
Notes 8.1; 8.1.1Three causes of entry into the kernelSystem calls, exceptions, and hardware interrupts cross the privilege boundary for different reasons.Open full sizeSave editable SVG
Notes 8.3.1; 8.3.3; 8.3.5Paging uses scattered free framesA contiguous allocation can fail despite sufficient total free memory; paging maps adjacent virtual pages to separate free frames.Open full sizeSave editable SVG
Notes 8.4.5Interrupts allow useful CPU work while a device runsA timeline contrasts repeated status polling with device operation overlapping another runnable task.Open full sizeSave editable SVG
Notes 8.2.1; 8.2.2; 8.4.5I/O completion makes a task ready, not immediately runningA blocked task becomes runnable on I/O completion, then waits until the scheduler selects it.Open full sizeSave editable SVG
Notes 8.3.1; 8.3.5Shared storage can split on a private writeConceptual copy-on-write sharing maps two address spaces to one frame until a private writer needs its own copy.Open full sizeSave editable SVG
Notes 8.2.3Signal delivery temporarily redirects user executionThe kernel saves user context in a signal frame, runs the handler and restores the interrupted context through sigreturn.Open full sizeSave editable SVG
Notes 8.3.5A TLB caches translations, not program dataVirtual page number is translated through a cached entry or page table; the offset is preserved.Open full sizeSave editable SVG
Notes 8.4.8One path can cross into another filesystemPathname lookup follows the common directory tree and crosses a mount point into the mounted filesystem root.Open full sizeSave editable SVG
Notes 9.4.1A callback separates registration from invocationThe application describes an action now; an event source invokes it later.Open full sizeSave editable SVG
Notes 9.4.3Metaprogramming has two separate executionsThe generator runs to produce a program; the generated program runs to solve the task.Open full sizeSave editable SVG
Notes 9.2.3A fold chooses the nesting of operationsSubtraction exposes the difference: changing the fold direction changes the expression.Open full sizeSave editable SVG
Notes 9.4.2; 10.10Explicit state turns chunks into complete linesA byte stream can end a read anywhere, including in the middle of one logical message.Open full sizeSave editable SVG
Notes 9.2.4A tail call leaves no work for its callerCompare a pending addition with a direct return of the next call.Open full sizeSave editable SVG
Notes 9.2.1Recursion remembers the route through a treeIn-order traversal: finish the left subtree, visit the node, then finish the right subtree.Open full sizeSave editable SVG
Notes 10.3.4; 10.8.2An abstract data type protects a representation invariantExample: a buffer must always satisfy 0 <= size <= capacity.Open full sizeSave editable SVG
Notes 10.10One event selector dispatches many client sessionsDescriptor readiness selects a handler; each session retains its own partially received line.Open full sizeSave editable SVG
Notes 10.4.15; 10.6.4Construction order also defines destruction orderFor this single-base class, member declaration order controls initialization.Open full sizeSave editable SVG
Notes 10.4.10; 10.4.18Initialization and assignment start from different statesThe syntax looks similar, but only assignment replaces the value of an existing object.Open full sizeSave editable SVG
Notes 10.5.3; 10.5.7Stack unwinding releases fully constructed local ownersAn exception transfers control to a matching handler and destroys automatic objects on the way.Open full sizeSave editable SVG
Notes 10.6.2; 10.6.10Copying into a base value discards the derived partA pointer or reference can preserve access to the complete object; a base value cannot contain it.Open full sizeSave editable SVG
Notes 10.4.10; 10.4.18; 10.4.19Copying a pointer is not copying its owned storageA raw owning pointer needs an explicit copy policy; this example uses independent deep copies.Open full sizeSave editable SVG
Notes 10.4.25A proxy separates reading a cell from writing itThe indexing result carries the array and index until its use determines the operation.Open full sizeSave editable SVG
Notes 10.7.1; 10.7.2; 10.7.3One template produces type-specific operationsTemplate arguments are chosen at compile time; ordinary calls then use instantiated code.Open full sizeSave editable SVG
Notes 10.3.1; 10.3.2A member call passes an object as well as argumentsTwo objects share method code; the implicit object pointer chooses which state the method sees.Open full sizeSave editable SVG
Notes 10.6.5; 10.6.6A virtual call follows the actual object typeShape* describes the interface; the referenced object chooses the final override.Open full sizeSave editable SVG
Notes 10.11.2; 10.11.10A callback adapter restores object-specific behaviorA static bridge matches the toolkit signature, then invokes a virtual operation on the widget object.Open full sizeSave editable SVG
Notes 11.1.9; 11.1.10A closure keeps the environment of its creationThe captured binding belongs to the lexical environment, not to the caller that invokes the closure.Open full sizeSave editable SVG
Notes 11.1.3; 11.1.6Two lists can share a tail without copying itA cons cell contains a head and a tail. Sharing is safe while the shared cells remain unchanged.Open full sizeSave editable SVG
Notes 11.2.4; 11.2.5A continuation represents the rest of a computationAt the marked point, the waiting context is "add 1 to the value produced here".Open full sizeSave editable SVG
Notes 11.5.14Currying replaces a tuple input with a returned functionf(x,y) = 10*x + y becomes a function that accepts x, then returns a function awaiting y.Open full sizeSave editable SVG
Notes 11.1.4; 11.1.7The same list can be program structure or dataEvaluation interprets a form; quotation returns its structure without evaluating that form.Open full sizeSave editable SVG
Notes 11.5.15A fixed point ties a recursive function back to its bodyFor a list sum, the transformer receives the recursive operation instead of calling itself by name.Open full sizeSave editable SVG
Notes 11.5.12; 11.5.13A finite demand can use an infinite structureKeep the tail suspended; unfold only enough cells to satisfy the consumer.Open full sizeSave editable SVG
Notes 11.5.1Lazy evaluation delays work and shares its resultA suspended computation is evaluated only when demanded; later uses can reuse the value.Open full sizeSave editable SVG
Notes 11.1.11; 11.5.11Map preserves the shape; fold summarizes the sequenceBoth take a function as an argument, but they organize the computation differently.Open full sizeSave editable SVG
Notes 11.4.5; 11.4.6Backtracking explores alternatives and undoes bindingsFacts are tried in order; failure resumes the most recent remaining choice.Open full sizeSave editable SVG
Notes 11.4.7One relation can be queried in several directionsappend(A,B,C) relates a prefix, a suffix and their concatenation.Open full sizeSave editable SVG
Notes 11.4.3; 11.4.4Unification finds a consistent substitutionMatching proceeds through the structure of both terms; repeated variables must agree everywhere.Open full sizeSave editable SVG
Notes 12.3.1; 12.3.2Embedding creates a two-way boundary between C and TclC owns the interpreter; registered commands let scripts call selected application operations.Open full sizeSave editable SVG
Notes 12.5.3Execution strategies differ in which representations runA language can have several implementations; source syntax alone does not choose the execution strategy.Open full sizeSave editable SVG
Notes 12.5.5; 12.5.7Self-contained delivery is a boundary around dependenciesBundling a runtime changes deployment; it does not by itself change interpretation into native compilation.Open full sizeSave editable SVG
Notes 12.2.3Braces delay substitution until the receiving command actsThe outer parser preserves a braced word; expr or if can later interpret that word as an expression.Open full sizeSave editable SVG
Notes 12.2.1; 12.2.2; 12.2.3Tcl groups words before ordinary substitutionA substituted value stays inside its word; spaces in the value do not become extra arguments.Open full sizeSave editable SVG
Notes 12.4.3; 12.4.4Widget names express containment; a manager controls layoutThe same parent-child tree can be arranged geometrically without absolute coordinates in every child.Open full sizeSave editable SVG