Skip to content
TaeyoungKim.dev

Data Structures and Concurrency Terms: Stack, Queue, Mutex, Deadlock

CSWritten 4 min readTaeyoungKim
LinkedInX

A stack and a queue can hold the same values yet return them in different orders. Arrays and trees describe how data is organized; mutexes and semaphores coordinate access by concurrent work. When you see “deadlock,” ask whether the problem is the storage structure or a relationship between waiting tasks.

Key terms

Arrays, stacks, and queues organize and retrieve data. Threads and mutexes instead concern concurrent access to shared data.

TermMeaning
ArrayAn indexed sequence of elements. A traditional fixed-size array stores same-typed elements in a contiguous layout; language-specific array types can have different rules.
Stack (data structure)A last-in, first-out (LIFO) structure: push adds at one end and pop removes from that end.
QueueA first-in, first-out (FIFO) structure: items enter at one end and leave from the other.
OverflowA value or insertion exceeds a defined representation range or storage capacity. The exact failure depends on the type or structure.
UnderflowAn operation tries to remove an item from an empty stack or queue, or a numeric result falls below the representable range.

Terms to distinguish

TermMeaning
TreeNodes connected by edges in a hierarchy without cycles. It is a special kind of graph.
NodeAn individual element of a structure. In a tree or graph it is a vertex; in a linked list it commonly holds data and a link to another element.
pointerA value that refers to a memory address. In a linked structure, a pointer can link to the next node.
Big-OAsymptotic notation describing an upper bound on how time or space use grows with input size, such as O(1), O(log n), O(n), or O(n²).
Critical sectionCode that accesses shared state and must be coordinated so conflicting concurrent execution does not corrupt that state.

Terms in code

TermMeaning
Mutual exclusion, mutexMutual exclusion allows only one task at a time into a protected critical section; a mutex is a synchronization mechanism used to enforce that rule.
DeadlockTwo or more tasks cannot proceed because each waits for a resource or action held by another in a cycle of dependencies.
semaphoreA synchronization mechanism, often using a counter and wait/signal operations, that controls access to a limited number of resources or coordinates tasks.
Race conditionA result depends on the timing or ordering of concurrent operations, potentially producing an unintended outcome.
Recursive functionA function that calls itself, directly or indirectly, and needs a condition that stops the recursion.

Reading a technical document

A stack and a queue differ in removal order; a mutex and a semaphore differ in how they coordinate access to shared resources.

When several unfamiliar terms appear together, identify the subject and action first. Then classify the remaining words as a structure, state, or coordination mechanism. A storage choice and a concurrency bug can appear in one sentence without being the same kind of problem.

Key takeaways

Separate how data is organized from how concurrent work accesses it.

  • Array — An indexed sequence; the exact storage guarantees depend on the language and array type.
  • pointer — A value referring to a memory address, often used as a link in connected structures.
  • Recursive function — A function that calls itself and requires a stopping condition.

Author

TaeyoungKim

Connecting technical foundations with implementation, verification, and production decisions.

#developer terminology#data structures#concurrency#vocabulary series 12

Read next