AI Dictionary › Fondamenti AI

Concurrency

Concorrenza

Concurrency is a system's ability to manage multiple activities in progress over the same period, interleaving or overlapping them. It differs from parallelism: concurrency is dealing with many things at once (even on a single processor, by switching quickly), parallelism is physically doing them at the same instant on multiple compute units. One bartender juggling four orders works concurrently; four bartenders work in parallel.

Definition

What it is

Concurrency is a system's ability to manage multiple activities in progress over the same period, interleaving or overlapping them. It differs from parallelism: concurrency is dealing with many things at once (even on a single processor, by switching quickly), parallelism is physically doing them at the same instant on multiple compute units. One bartender juggling four orders works concurrently; four bartenders work in parallel.

How it works

The tools are threads, processes, coroutines and the async/await model: the latter lets a single thread handle thousands of waiting operations (network, disk) by suspending and resuming tasks. The dangers are race conditions and deadlocks; the defenses are locks, message queues and immutable structures. Writing correct concurrent code remains among programming's hardest challenges.

Applications

In AI, concurrency is everywhere: inference servers juggle thousands of simultaneous requests, agents run tool calls in parallel to cut completion time, and applications orchestrate multiple concurrent LLM calls and merge the results. Beyond AI it underpins web servers, databases and responsive interfaces.

History & etymology

The theoretical foundations were laid in the 1960s: Edsger Dijkstra formalized the problems of concurrent programming and introduced semaphores in 1965, along with the famous dining philosophers problem; Tony Hoare contributed the CSP model (Communicating Sequential Processes) in 1978, which still inspires languages like Go. The term comes from the Latin concurrere, to run together.

Definizione (italiano)

La concorrenza è la capacità di un sistema di gestire più attività in corso nello stesso periodo, alternandole o sovrapponendole. Si distingue dal parallelismo: concorrenza è gestire più cose insieme (anche su un solo processore, alternandole velocemente), parallelismo è farle fisicamente nello stesso istante su più unità di calcolo. Un barista che segue quattro ordinazioni alternandole lavora in concorrenza; quattro baristi lavorano in parallelo.

Gli strumenti sono thread, processi, coroutine e modello async/await: quest'ultimo permette a un solo thread di gestire migliaia di operazioni di attesa (rete, disco) sospendendo e riprendendo le attività. I pericoli sono le race condition e i deadlock, e le difese sono lock, code di messaggi e strutture immutabili. Scrivere codice concorrente corretto resta tra le sfide più difficili della programmazione.

Nell'AI la concorrenza è ovunque: i server di inferenza gestiscono migliaia di richieste simultanee, gli agenti eseguono chiamate a strumenti in parallelo per accorciare i tempi e le applicazioni orchestrano più chiamate LLM concorrenti aggregandone i risultati. Fuori dall'AI è il fondamento di web server, database e interfacce reattive.

Le basi teoriche furono poste negli anni '60: Edsger Dijkstra formalizzò i problemi della programmazione concorrente e introdusse i semafori nel 1965, insieme al celebre problema dei filosofi a cena; Tony Hoare contribuì nel 1978 con il modello CSP (Communicating Sequential Processes), che ispira ancora linguaggi come Go. Il termine viene dal latino concurrere, correre insieme.

Related terms

More in Fondamenti AI

Put it into practice

From our network

Magellano GPS — Fleet Tracking Made Simple

Real-time GPS tracking, remote engine lock, fuel and CO₂ reporting for your fleet.

Visit magellanogps.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.