Open main menu

CDOT Wiki β

Changes

GPU621/Go Kimchi

1,368 bytes added, 05:47, 3 August 2021
Parallel Programming in GO & Java
Java is the platform independent language. Programs can run on several different types of computer as long as computer has a Java Runtime Environment(JRE) installed
 
 
 
=== Parallel Programming in GO & Java ===
'''Parallelism and Concurrency'''
Rob Pike who is developer of Go language has defined parallelism and concurrency in his speech “Concurrency is not Parallelism”[[1]https://www.youtube.com/watch?v=oV9rvDllKEg"Concurrency is not Parallelism"]: ''Parallelism'' defined as Parallelism is about doing lots of things at once. ''Concurrency'' defined as Concurrency is about dealing with lots of things at once. Concurrency allows to execute multiple tasks in partial order or out of order. The executions must finished before the next execution can start. While, parallelism has simultaneous execution on a multicore per CPU.  If we combine two concepts:   Concurrency Concurrency + parallelism (Single-Core CPU) (Multi-Core CPU) ___ ___ ___ |th1| |th1|th2| | | | |___| |___|___ | |___ |th2| |___|th2| ___|___| ___|___| |th1| |th1| |___|___ | |___ |th2| | |th2| diagram cited by Pithikos in [https://stackoverflow.com/questions/1050222/what-is-the-difference-between-concurrency-and-parallelism Stack Overflow] Go language focuses on concurrency and parallelism by implementing its own Goroutine instead of regular threading. Goroutines uses the built-in scheduler to conduct the threads in behind and hide many complexity of thread management from the user to specify which function to run and execute them with “Go” command.
58
edits