Definitions & Scenarios. Concurrency. Acknowledgements. This tutorial is based in part on Concurrency: State Models & Java Programming by Jeff Magee and Jeff Kramer. Acknowledgements. Tutorial Authors/Creators: Zhen Li, Eileen Kraemer, Zhe Zhao Computer Science Department
Une image / un lien ci-dessous est fourni (tel quel) pour télécharger la présentation
Politique de téléchargement : le contenu du site vous est fourni TEL QUEL pour votre information et votre usage personnel ; il ne peut être vendu, concédé sous licence ni partagé sur d’autres sites sans l’accord de son auteur.Le contenu vous est fourni TEL QUEL, pour votre information et votre usage personnel uniquement.Téléchargez la présentation en cliquant sur ce lien.Lors du téléchargement, si vous ne parvenez pas à télécharger une présentation, l’éditeur a peut-être supprimé le fichier de son serveur.Pendant le téléchargement, si vous ne parvenez pas à obtenir une présentation, le fichier a peut-être été supprimé par l’éditeur.
Sequential v. Concurrent • Programs consist of subprograms or procedures • simpler sets of activities that together make up the overall program • Sequential program • Subprograms are executed one after the other in fixed order, determined by program’s input • Concurrent program • The execution of subprograms may overlap in time
Concurrent Program • Computational activities that overlap in time may occur in parallel, or be interleaved. Interleaved Parallelism
Concurrent Program • In a concurrent program, computational activities are permitted to overlap in time. Interleaved Parallelism
Concurrent Program • In a concurrent program, computational activities are permitted to overlap in time. Interleaved Parallelism
Process • The execution of a sequential program or subprogram • A unit of sequential execution • A concurrent program consists of multiple processes.
Process Three processes in each figure Interleaved Parallelism
Thread • A method of implementing concurrency Two different implementations Interleaved Parallelism
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume alive Waiting (Non-runnable)
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch running Ready (Runnable) yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive
Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive