SlideServe
Menu
Préférences
© SlideServe · v2026

Concurrency

treva avatar
56 diapositives · 767 Views · Jul 20, 2014

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

Concurrency - slide 1
01 / 56Concurrency
1 / 17

Télécharger la présentation

Concurrency
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.

F I N

Plus de contenu associé

Transcription de la présentation
  1. Definitions & Scenarios Concurrency

  2. Acknowledgements • This tutorial is based in part on Concurrency: State Models & Java Programming by Jeff Magee and Jeff Kramer.

  3. Acknowledgements • Tutorial Authors/Creators: Zhen Li, Eileen Kraemer, Zhe Zhao Computer Science Department The University of Georgia

  4. Concurrent Program Process & Thread Thread Life Cycle Definitions

  5. 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

  6. Concurrent Program • Computational activities that overlap in time may occur in parallel, or be interleaved. Interleaved Parallelism

  7. Concurrent Program • In a concurrent program, computational activities are permitted to overlap in time. Interleaved Parallelism

  8. Concurrent Program • In a concurrent program, computational activities are permitted to overlap in time. Interleaved Parallelism

  9. Process • The execution of a sequential program or subprogram • A unit of sequential execution • A concurrent program consists of multiple processes.

  10. Process Three processes in each figure Interleaved Parallelism

  11. Thread • A method of implementing concurrency Two different implementations Interleaved Parallelism

  12. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  13. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  14. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  15. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  16. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  17. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  18. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume alive Waiting (Non-runnable)

  19. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  20. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  21. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  22. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  23. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  24. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  25. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  26. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  27. Thread Life Cycle created terminated stop start stop dispatch running Ready (Runnable) yield suspend resume Waiting (Non-runnable) alive

  28. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  29. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  30. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  31. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  32. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  33. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  34. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  35. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  36. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  37. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  38. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  39. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  40. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  41. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  42. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  43. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  44. Thread Life Cycle created terminated stop start stop dispatch Ready (Runnable) running yield suspend resume Waiting (Non-runnable) alive

  45. Shared Objects Conditional Synchronization Resource Allocation Scenarios

  46. Shared Object • Multiple threads have computational activities on the same object • Ornamental Garden Garden East Turnstile West Turnstile

  47. A Naïve Implementation shared object thread thread Garden East Turnstile West Turnstile population

  48. A Naïve Implementation

  49. Problem

  50. Problem