What you will learn in Grokking Concurrency
Chapter by chapter
Chapter 8: Solving concurrency problems: Race conditions and synchronization
What you learn in chapter 8 →Concepts explained in this book
- parallelismParallelism is the simultaneous execution or simultaneous progress of multiple computational operations.
- concurrencyConcurrent execution is execution in which multiple tasks make progress during overlapping periods, whether or not they run simultaneously on separate resources.
- asynchronous programmingAn asynchronous operation is an operation that can be initiated without blocking the initiating computation until it completes.
- decompositionData decomposition is a parallel programming technique that partitions a collection of data into independent chunks and applies the same operation to each chunk.
- sequential processingSerial or sequential execution is execution in which tasks run one after another, with a later task waiting for the preceding task to complete.
- threadA thread is an independently schedulable sequence of execution within a process that typically shares the process's memory and resources.
- synchronizationSynchronization is coordination that controls access to shared resources and orders task execution so required exclusivity or dependencies are respected.
- independenceTask independence is the property that tasks can execute in any order without depending on one another's intermediate results.
- network socketA network socket is an operating-system communication endpoint for exchanging data between processes over a network.
- coroutineA coroutine is a computation or function whose execution can be paused and later resumed, enabling cooperative asynchronous control flow.
- event loopAn event loop is a control-flow pattern that repeatedly waits for pending events, selects their handlers, and invokes those handlers.
- schedulerA scheduler is a runtime or operating-system component that selects and orders tasks for execution and may control their access to processing resources.
- JavaScript runtimeA runtime environment is the software and system context that provides services for executing programs on a computing architecture.
- queueA FIFO is a first-in, first-out communication mechanism in which data is processed in the order it arrives.
- synchronous callA synchronous call is an I/O call that retains control until the operation completes and thereby creates a synchronization point.
- agglomerationAgglomeration is the combination of smaller computational tasks into larger units to reduce coordination and communication costs.
- interprocess communicationInterprocess communication (IPC) comprises operating-system mechanisms that allow processes to exchange data and coordinate execution.
- futureA future is a concurrency abstraction and placeholder representing the result of an asynchronous computation that will become available later.
- I/O-bound workAn I/O-bound operation is an operation whose completion primarily depends on input/output activity or waiting for external hardware or services.
- non-blocking I/ONonblocking I/O is an input/output technique in which an operation returns control without waiting for its external operation to complete.
- cooperative multitaskingCooperative multitasking is a multitasking technique in which running tasks voluntarily yield control so other tasks can execute.
- preemptionPreemptive multitasking is an operating-system technique in which the system can suspend a running task without requiring its cooperation and schedule another task.
- multitaskingMultitasking is a runtime technique for managing multiple tasks so they can make progress within one computing system.
- communicationCommunication is the exchange of information or coordination signals between concurrent tasks, processes, or threads.
- message passingMessage passing is an interprocess communication technique in which execution contexts exchange data through discrete messages rather than directly sharing memory.
- race conditionA race condition is a concurrency bug in which the result depends on the timing or ordering of competing accesses to shared state or resources.
- callbackA callback is a function supplied to another component to be invoked later in response to a specified event or completion condition.
- lockingA lock is a synchronization mechanism that restricts access to a shared resource so that competing tasks cannot modify it simultaneously.
- thread poolA thread pool is a concurrency pattern that maintains a collection of reusable worker threads and assigns submitted tasks to available threads.
- named pipeA named pipe is a pipe identified by a system-visible name that enables data transfer between processes on the same computer or across a network.
- pipeA pipe is an operating-system communication mechanism that transfers data between processes through a unidirectional or coordinated data stream.
- serverA server application is a program that listens for client connections and provides services over those connections.
- shared memoryA shared variable is a variable whose value can be accessed by multiple concurrent tasks.
- workflowA process is an operating-system-managed instance of a running program with its own execution context and resources.
- blockingBlocking is a condition in which a task or operation cannot make progress until a required event, resource, or I/O operation completes.
- critical regionA critical section is a portion of program execution that accesses shared data or resources and must be protected from conflicting concurrent access.
- embarrassingly parallelAn embarrassingly parallel problem is a problem whose tasks can execute independently with no communication or synchronization between them.
- compute-boundA CPU-bound operation is a computational operation whose execution is primarily limited by processor computation rather than input/output or other resources.
- Unix socketA UNIX domain socket is a socket endpoint for bidirectional communication between tasks on the same operating system.
- taskA task is a logically independent chunk of work that serves as a general abstraction for a unit of execution.
- context switchingContext switching is the operating-system procedure of saving one task's execution state and restoring another task's state so execution can be transferred between them.
- shared resourceA shared object is a data or resource object accessed by multiple concurrent execution threads.
- speedupSpeedup is the ratio comparing the time required by a baseline execution with the time required by a parallel execution.
- deadlockA deadlock is a concurrency state in which multiple tasks wait indefinitely for resources held by one another, preventing all of them from continuing.
- I/O multiplexingI/O multiplexing is an operating-system technique that monitors multiple I/O resources and reports which are ready for processing.
- fine-grained decompositionFine-grained decomposition divides a computation into many relatively small tasks.
- clientA client process is a process that initiates a connection to a server to request or exchange data.
- address spaceAn address space is the range and mapping of memory addresses available to a process or other execution context.
- task mappingTask mapping is the assignment of computational tasks to processors or other processing resources.
- execution contextThe collection of program state, executable instructions, memory, and resources associated with a running process.
- MapReduceThe map/reduce pattern applies computation independently to partitioned inputs and then combines the intermediate results.
- Amdahl’s LawAmdahl's law is a formula for estimating the maximum speedup of a computation from its sequential fraction and available processing resources.
- livelockA livelock is a concurrency failure in which tasks remain active but repeatedly relinquish and reacquire resources without making progress.
- dataset splitPartitioning is a parallel algorithm design technique that identifies independent computational tasks or data subsets for concurrent execution.
- granularityGranularity is the degree to which a computation is divided into tasks, characterized by the number and size of those tasks.
- fork-join modelThe fork/join pattern divides a problem into independent subtasks, processes them concurrently, and combines their results into the overall solution.
- performancePerformance is the measured efficiency or speed with which a system completes computational work, commonly characterized by latency and throughput.
- event-based approachEvent-based concurrency is a concurrency technique in which an event loop dispatches nonblocking events to handlers or callbacks instead of waiting synchronously for each operation.
- thread safetyThread safety is the property of a function or operation behaving correctly when accessed concurrently by multiple tasks under any scheduling or interleaving.
- localityLocality is the property of placing interacting tasks or accessed data close together in a computational or memory hierarchy to reduce access and communication costs.
- pipelinePipeline processing is a technique that divides computation into stages so different stages can operate concurrently on different portions of the work.
- scalabilityScalability is a system characteristic describing its ability to increase performance by adding processing resources.
- semaphoreA semaphore is a synchronization primitive that controls access to a resource while allowing multiple tasks to hold access concurrently.
- server socketA server socket is a socket configured to listen for and accept incoming client connections.
- starvationStarvation is a concurrency failure in which a task is indefinitely denied the resources or execution opportunities needed to make progress.
- operating systemAn operating system is system software that manages computer hardware resources and provides services for application programs.
- producer-consumerThe producer-consumer pattern coordinates tasks that generate data with tasks that process that data, typically through a shared buffer or queue.
- MIMD architectureMIMD (multiple instruction, multiple data) is a parallel computer architecture in which multiple processing units execute different instructions on different data.
- parallel sectionA parallel part is a portion of an algorithm whose independent operations can execute concurrently.
- serial partA sequential part is a portion of an algorithm whose operations must execute in an order that prevents independent parallel execution.
- SIMD hardwareSIMD architecture is a parallel computer architecture in which multiple processing units apply the same instruction to multiple data elements.
- busy pollingBusy-waiting is a technique in which a task repeatedly checks for a condition instead of blocking while waiting for it.
- event queueAn event queue is an ordered collection of pending events awaiting processing by an application or event loop.
- load balancingLoad balance is the degree to which computational work is distributed evenly across available workers or processing resources.
- interruptA hardware interrupt is an interrupt generated by a hardware device or controller to request processor attention.
- time sliceA time slice is a bounded interval during which a scheduled task is allowed to execute on a processor before potentially being preempted.
- reactor patternThe reactor pattern is an event-driven concurrency pattern that demultiplexes readiness notifications and dispatches them to handlers, typically through a single event loop.
- reduce taskA reduce phase is the stage of a map/reduce computation that combines intermediate values associated with keys into final results.
- atomicityAtomicity is the property that an operation occurs as one indivisible action, either completing entirely or not taking effect.
- Foster’s design methodologyFoster’s design methodology is a four-step approach to designing parallel algorithms through partitioning, communication, agglomeration, and mapping.
- CPUA processor, or central processing unit (CPU), is hardware that executes machine instructions and performs general-purpose computation.
- meanLatency is the elapsed time required for a task or action to complete from start to finish.
- throughputThroughput is the number of tasks a system completes or handles during a given period of time.
- selectselect is an operating-system interface that waits for one or more file descriptors or sockets to become ready for I/O.
- logical threadA user-level thread is a thread managed by a user-space runtime or library rather than directly by the operating system.
- reader-writer problemThe readers-writer pattern coordinates concurrent access so multiple readers can share a resource while writers receive exclusive access.
- handlerAn event handler is a function or component that processes an event from a particular source or event type.
- decouplingDecoupling is a design technique that separates components or responsibilities to reduce their dependencies on one another.
- horizontal scalingA scaling approach that increases performance by distributing load across existing and additional processing resources.
- vertical scalingVertical scaling increases system performance by adding capacity to existing processing resources or replacing them with more powerful resources.
- communication overheadCommunication overhead, or communication cost, is the time or resource expense incurred when processors or concurrent tasks exchange data.
- name-value pairA key-value pair is a data representation consisting of a key associated with a corresponding value.
- coarse-grained decompositionCoarse-grained decomposition divides a computation into relatively few large tasks.
- map phaseA map phase is the stage of a map/reduce computation that independently processes partitioned input and produces intermediate results.
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.
