DPS921/Halt and Catch Fire

From CDOT Wiki
Revision as of 17:50, 1 December 2016 by Cpaul12 (talk | contribs)
Jump to: navigation, search

Halt and Catch Fire

Project: Parallelism with Go

Group Members

  1. Colin Paul [1] Research etc.

Progress

Oct 31st:

  • Picked topic
  • Picked presentation date.
  • Created Wiki page

Nov 28th:

  • Presented topic

Parallel Programming in Go

What is Go?

  • The Go language is an open source project to make programmers more productive.

  • It is expressive, concise, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multi-core and networked machines, while its novel type system enables flexible and modular program construction. Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language.

By what means does Go allow parallelism?

  • Go allows multi-core programming using concurrency methods, and enables the ability to parallelize.

TLDR;

What is parallelism?

  • Programming as the simultaneous execution of (possibly related) computations.

What is concurrency?

  • Concurrency is the composition of independently executing computations.
  • It is a way to structure software, particularly as a way to write clean code that interacts well with the real world.
  • It is not parallelism, but it enables it.
  • If you have only one processor, your program can still be concurrent but it cannot be parallel.
  • On the other hand, a well-written concurrent program might run efficiently in parallel on a multi-processor.

Concurrency vs parallelism

  • Concurrency is about dealing with lots of things at once.
  • Parallelism is about doing lots of things at once.
  • Not the same, but related.
  • Concurrency is about structure, parallelism is about execution.
  • Concurrency provides a way to structure a solution to solve a problem that may (but not necessarily) be parallelizable.

Examples of things that use a concurrent model

  • I/O - Mouse, keyboard, display, and disk drivers.

Examples of things that use a parallel model

  • GPU - performing vector dot products.