Concurrent Programming

From SwinBrain

Most programs are written with a single thread of control (i.e. one path through the program). Concurrent programs move beyond a single path, introducing multiple paths which are executed concurrently.


This section outlines some of the basics related to concurrent programming.

  • Design Factors: This page lists the main concerns when writing concurrent programs.
  • Critical Sections: Allow you to define sections of your code which cannot be accessed concurrently.


There are several different concurrency utilities that are commonly used.

  • Semaphore: This utility provides a way of sharing tokens between threads.
  • Mutex: This utility can be used to provide mutual exclusive access to a resource.
  • Latch: Is a Boolean switch that can be set once.
  • Barrier: This utility is used to "meet" at a certain point.
  • Exchanger: Allows multiple threads to exchange data.
  • Reader Writer Lock: Provides an advanced locking facility that distinguishes between readers and writers.
  • Channel: A channel is a buffer that is designed to be used in a concurrent environment. This allows threads to place data upon the Channel, and/or read data from the channel.


[edit]Utilities: Concurrent Programming | Semaphore | Mutex | Latch | Barrier | Exchanger | Reader Writer Lock | Channel
Links: Topic Brains
Return to Swin Brain

<taglist>[programming, concurrency]This page contains links to a numer of concurrent programming concepts.</taglist>