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.
| Term | Meaning |
|---|---|
Array | An 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. |
Queue | A first-in, first-out (FIFO) structure: items enter at one end and leave from the other. |
Overflow | A value or insertion exceeds a defined representation range or storage capacity. The exact failure depends on the type or structure. |
Underflow | An operation tries to remove an item from an empty stack or queue, or a numeric result falls below the representable range. |
Terms to distinguish
| Term | Meaning |
|---|---|
Tree | Nodes connected by edges in a hierarchy without cycles. It is a special kind of graph. |
Node | An 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. |
pointer | A value that refers to a memory address. In a linked structure, a pointer can link to the next node. |
Big-O | Asymptotic 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 section | Code that accesses shared state and must be coordinated so conflicting concurrent execution does not corrupt that state. |
Terms in code
| Term | Meaning |
|---|---|
Mutual exclusion, mutex | Mutual exclusion allows only one task at a time into a protected critical section; a mutex is a synchronization mechanism used to enforce that rule. |
Deadlock | Two or more tasks cannot proceed because each waits for a resource or action held by another in a cycle of dependencies. |
semaphore | A synchronization mechanism, often using a counter and wait/signal operations, that controls access to a limited number of resources or coordinates tasks. |
Race condition | A result depends on the timing or ordering of concurrent operations, potentially producing an unintended outcome. |
Recursive function | A 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.

