Skip to content

Latest commit

 

History

History
23 lines (21 loc) · 781 Bytes

File metadata and controls

23 lines (21 loc) · 781 Bytes

Independent Threads

  • no states shared with other threads
  • Deterministic computation
    • Output depends on the input
  • Reproducible
    • output does not depend on the order and timing of other threads

Cooperating Threads

  • Shared states
  • _Nondeterministic
  • Nonreproducable
  • shared resources
  • speedup
    • occurs when threads use different resources at the same times
  • Modularity
    • an application can be decomposed into threads
  • if threads work on different data the scheduling doe not matter
    • unless one relys on anothers data :)
    • race conditions occur when threads share data, and their results depend on timing of executions

Atomic Operations

  • an atomic operation always runs to completion; all or nothing
  • Many operations are not atomic