up:: [[paradigme de programmation]] #informatique > [!definition] programmation concurrente > Lorsque plusieurs "fils d'exécution", plusieurs [[processus]], plusieurs activités, sont indépendantes dans un programme (et peuvent donc être exécutée dans des périodes de temps qui se superposent) > ^definition > [!cite]- [Programming Paradigms for Dummies: What Every Programmer Should Know](zotero://select/groups/5383243/items/673TMQRT) - [Page 25](zotero://open-pdf/groups/5383243/items/P4L4LCJZ?page=17&annotation=FC4GVUSL) > For example, consider a program that consists of instructions executing one after the other. The instructions are not independent since they are ordered in time. To implement independence we need a new programming concept called concurrency. When two parts do not interact at all, we say they are concurrent.3 (When the order of execution of two parts is given, we say they are sequential.) > ^FC4GVUSLaP4L4LCJZg5383243p17 > [!cite]- Définition wikipedia (en) > **Concurrent computing** is a form of [computing](https://www.wikiwand.com/en/Computing "Computing") in which several [computations](https://www.wikiwand.com/en/Computation "Computation") are executed _[concurrently](https://www.wikiwand.com/en/Concurrency_(computer_science) "Concurrency (computer science)")_—during overlapping time periods—instead of _sequentially—_with one completing before the next starts. Il existe 3 types de concurrence : - les [[programmation distribuée|systèmes distribués]], où une activité concurrente est appelée un ordinateur - modèle d'internet - les [[système d'exploitation|systèmes d'exploitation]], où une activité concurrente est appelée un [[processus]] - les processus ont une mémoire indépendante - le système d'exploitation gère l'exécution et la mémoire - les activités au sein d'un [[processus]], où une activité concurrente est appelée un thread - les processus s'exécutent indépendamment, mais partagent leur mémoire - exemple : les onglets d'un navigateurs sont généralement des threads d'un même processus > [!cite]- [Programming Paradigms for Dummies: What Every Programmer Should Know](zotero://select/groups/5383243/items/673TMQRT) - [Page 26](zotero://open-pdf/groups/5383243/items/P4L4LCJZ?page=18&annotation=WC8JF4D6) > - Distributed system: a set of computers connected through a network. A concurrent activity is called a computer. This is the basic structure of the Internet. > > - Operating system: the software that manages a computer. A concurrent activity is called a process. Processes have independent memories. The operating system handles the task of mapping the process execution and memory to the computer. For example, each running application typically executes in one process. > > - Activities inside one process. A concurrent activity is called a thread. Threads execute independently but share the same memory space. For example, the different windows in a Web browser typically execute in separate threads. > ^2ELQQWG3aP4L4LCJZg5383243p18