What you will learn in Learn Concurrent Programming with Go
Chapter by chapter
Concepts explained in this book
- race conditionA race condition is a concurrency defect in which program behavior depends on the timing or interleaving of unsynchronized operations.
- goroutineA goroutine is a lightweight Go execution construct that represents a concurrent activity managed by the Go runtime.
- shared-memory interprocess communicationMemory sharing is a communication approach in which concurrent executions exchange information by accessing common memory.
- channelA Go channel is a typed communication and synchronization mechanism through which goroutines send and receive values.
- condition variableA condition variable is a synchronization mechanism that allows threads or goroutines to wait for a specified condition and be notified when it may hold.
- concurrencyA programming technique for writing software in which multiple tasks or processes can make progress during overlapping periods of time.
- atomicityAn atomic operation is an indivisible operation that cannot be interrupted during its execution.
- rwlockA readers-writer lock is a synchronization lock that permits multiple simultaneous readers while granting writers exclusive access.
- context switchingA context switch saves one task's execution state and restores another's so processor execution can move between tasks, threads, or goroutines.
- critical regionA critical section is a region of code that accesses shared state and requires coordination to prevent conflicting concurrent access.
- message passingMessage passing is a communication approach in which concurrent executions exchange information by sending and receiving messages.
- BroadcastA broadcast pattern replicates each input message to every channel in a set of output channels.
- select statementA select statement is a Go control-flow construct that waits for and chooses among channel communication operations.
- waitWait is a condition-variable operation that suspends an execution until the condition variable is signaled or broadcast while coordinating the wait with an associated mutex.
- barrierA barrier is a synchronization mechanism that suspends participating executions until all of them reach the same execution point, after which they resume and may participate again.
- pipelineA pipeline is a sequence of processing stages connected so that the output of one stage becomes the input of the next.
- sequential processingSequential execution is the execution of operations in an ordered flow without overlapping concurrent progress.
- deadlockA deadlock is a state in which two or more executions wait indefinitely for conditions that can be satisfied only by one another.
- SYS_futexA futex is an operating-system synchronization system call that allows user-space code to wait for and wake executions based on a shared memory value.
- compare-and-exchange operationCompare-and-swap is an atomic operation that compares a memory location with an expected value and replaces it with a new value only when they match, returning whether the replacement occurred.
- resource allocation graphA resource allocation graph is a directed graph whose nodes represent executions and resources and whose edges represent resource requests and assignments.
- go keywordThe Go keyword go starts a function invocation as a goroutine without making the caller wait for its completion.
- WaitGroupA waitgroup is a synchronization object that allows execution to wait until a counted set of concurrent operations has completed.
- parallelismParallelism is the simultaneous execution of multiple computations, typically on multiple processing resources.
- circular waitA circular wait is a dependency cycle in which each concurrent execution waits for a condition or resource held by another execution in the cycle.
- semaphoreA synchronization mechanism that controls concurrent access to a resource through a counter of available permits.
- spinlockA spin lock is a mutual-exclusion lock whose unsuccessful acquisition repeatedly retries while the execution remains active instead of blocking.
- first-class objectA first-class object is a value that a programming language allows to be stored, passed as an argument, returned from a function, or otherwise handled like other ordinary values.
- operating systemAn operating system is system software that manages computer hardware and provides services and abstractions for application programs.
- monitorA synchronization pattern in which executions check a shared condition while holding a mutex, wait when it is false, and signal or broadcast when the state changes.
- multithreadingMultithreading is a programming approach in which multiple threads execute concurrently within a single process or application.
- fan-inA fan-in pattern merges values from multiple concurrent sources into a single stream.
- multiprocessingAn operating-system capability in which multiple tasks are managed so that more than one can make progress on available processor resources.
- time sharingA scheduling technique that lets multiple tasks share one processor by giving each task turns of execution.
- WaitGroup Done methodA waitgroup Done operation decrements the count of outstanding operations tracked by a waitgroup.
- write-preferring readers-writer lockA write-preferring readers-writer lock is a readers-writer synchronization lock that prioritizes waiting writers to prevent prolonged writer blocking.
- hybrid threading systemA hybrid threading system combines user-level execution units with multiple kernel-level threads that the operating system schedules.
- work stealingWork stealing is a scheduling technique in which an execution worker takes tasks from another worker's queue to improve utilization.
- Go runtimeThe Go runtime is the standard execution environment that manages Go program services such as goroutine scheduling.
- logical threadA user-level thread is a thread managed by a language runtime or user-space library rather than directly by the operating system kernel.
- GoGo is a statically typed, compiled programming language designed for simplicity, readability, and efficient execution, including built-in support for concurrency.
- deadlock detectionDeadlock detection is the computational identification of a state in which executions are indefinitely waiting on one another or on unavailable resources.
- closed channelA closed channel is a Go channel marked as unable to accept further sends while still allowing pending or zero-valued receives.
- scheduling algorithmAn algorithm that determines which task should be selected for execution from available tasks.
- POSIX Threads APIPOSIX Threads is a standardized API and specification for creating, managing, and synchronizing threads.
- starvationStarvation is a situation in which an execution is blocked from gaining access to a shared resource because other executions keep it unavailable for a long time or indefinitely.
- local queueA local run queue is a scheduler queue associated with one kernel-level thread and containing goroutines assigned to that thread.
- m:n threadingAn M:N threading model maps M user-level threads to N kernel-level threads.
- rwmutexsync.RWMutex is Go's standard mutual-exclusion type that provides both exclusive locking and shared reader locking.
- matrix-matrix multiplicationMatrix multiplication is the linear-algebra operation that computes a matrix product from weighted sums of rows and columns.
- banker's algorithmThe banker's algorithm is a deadlock-avoidance algorithm that grants resource requests only when the resulting state can still complete all executions within their declared maximum resource demands.
- arbitratorAn arbitrator is a coordination component that controls access to shared resources by suspending requests until the required resources are available.
- deadlock avoidanceDeadlock avoidance is the dynamic allocation of resources or scheduling of executions so that the system does not enter a deadlocked state.
- safe stateA safe state is a resource-allocation state from which there is an execution schedule allowing every execution to complete even if each requests its maximum resources.
- unsafe stateAn unsafe state is a resource-allocation state for which no schedule is guaranteed to let all executions complete within their maximum resource demands.
- communicating sequential processCommunicating sequential processes (CSP) is a formal concurrency model in which isolated sequential processes interact by exchanging messages through synchronized channels.
- decompositionTask decomposition is the technique of dividing a computation into distinct units of work that can be assigned or coordinated independently.
- heisenbugA Heisenbug is a software bug whose behavior disappears or changes when debugging or observation alters execution timing.
- user-level schedulingUser-level scheduling is scheduling performed by a language runtime or user-space library rather than directly by the operating-system kernel.
- write starvationA starvation condition in which a writer is indefinitely or excessively delayed because readers continuously hold a shared resource.
- sync.CondThe Go standard-library condition-variable type that coordinates waiting and signaling through a sync.Locker.
- parallel loopLoop-level parallelism is a pattern that executes independent loop iterations concurrently or in parallel.
- Amdahl’s LawA performance model stating that the overall speedup from optimizing or parallelizing a system is limited by the fraction of execution that remains sequential.
- futex_waitfutex_wait is a futex operation that suspends an execution when a memory address still contains an expected value.
- futex_wakeFUTEX_WAKE is a Linux futex operation code requesting resumption of executions waiting on a memory address.
- close functionclose is a Go built-in function that marks a channel as closed so that no further values can be sent to it.
- speedupSpeedup is the ratio of a computation's execution time in a baseline configuration to its execution time in an improved or parallel configuration.
- cycle detectionCycle detection is the identification of a closed path in a graph by tracking visited nodes or equivalent traversal state.
- nil channelA nil channel is a Go channel value with no associated channel resource on which communication operations block indefinitely.
- ReadLockReadLock is a function that acquires the read side of the book's readers-writer mutex implementation.
- ReadUnlockReadUnlock is a function that releases the read side of the book's readers-writer mutex implementation.
- WriteLockWriteLock is a function that acquires the exclusive write side of the book's readers-writer mutex implementation.
- WriteUnlockWriteUnlock is a function that releases the exclusive write side of the book's readers-writer mutex implementation.
- thread communicationThread communication is the exchange of information or coordination signals between concurrently executing threads.
- fork-join modelFork/join is a concurrency pattern that performs parallel subtasks and then combines their results in a final join step.
- channel capacityChannel capacity is the maximum number of messages a channel can hold before a send must wait for receiving capacity.
- try_lockTryLock is a Go mutex operation that acquires an available mutex immediately and returns false immediately when the mutex is unavailable.
- default caseA default case is the select branch that executes immediately when no other channel communication case is ready.
- queueA queue is a data structure that stores elements in an ordered sequence for removal according to a queueing policy, typically first in, first out.
- concurrency primitiveClassical concurrency primitives are low-level synchronization mechanisms traditionally used to coordinate concurrent execution.
- fan-outA fan-out pattern distributes messages from one source among multiple concurrent consumers so that each message is processed by one consumer.
- no preemptionNo preemption is a deadlock condition in which resources held by an execution cannot be forcibly taken away and must be released by that execution.
- wait-for conditionThe wait-for condition is a deadlock condition in which an execution holding resources can request additional resources.
- sync packagesync is a Go standard-library package that provides synchronization primitives and related concurrency utilities.
- loop-carried dependenceA loop-carried dependence occurs when a step in one loop iteration depends on a step from another iteration of the same loop.
- buffered channelA buffered channel is a Go channel with finite storage capacity that permits sends or receives to proceed without an immediate counterpart while capacity or queued values remain.
- LoadInt32LoadInt32 is a Go sync/atomic function that atomically loads a signed 32-bit integer value.
- permitA semaphore permit is a counted unit of availability that an acquisition can consume and a release can add.
- nil channel patternA nil channel pattern disables a select case by assigning nil to its channel after that channel closes.
- load balancingLoad balancing is the distribution of work across multiple workers or processing resources to avoid concentrating demand on one worker.
- dynamic linear pipelineA dynamic linear pipeline is a one-directional processing chain that can grow by adding stages as the computation proceeds.
- prime number pipeline algorithmThe prime number pipeline algorithm generates prime numbers by passing candidate integers through stages that filter multiples of previously found primes.
- bus systemA system bus is a communication pathway that transfers requests and data between processors, caches, and main memory.
- cache-coherent systemCache coherence is the coordination of cached copies so that processors observe consistent values for shared memory locations.
- cache lineA cache line is a block-sized unit of memory storage that a cache transfers and tracks as a copy of main memory.
- coherency wallThe coherency wall is a scalability limit caused by the increasing complexity, cost, and performance impact of maintaining cache coherence across many processor cores.
- write-back with invalidationWrite-back with invalidation is a cache-coherence protocol that propagates an updated cached value and invalidates stale copies in other caches.
- write-through cachingCache write-through is a cache update policy that immediately mirrors writes to the corresponding location in main memory.
- runtime.Goschedruntime.Gosched is a Go runtime function that yields the processor so the scheduler can select another runnable goroutine.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
