Parallelism Versus Concurrency

Lest our discussion of concurrency and parallelism lead you to think they are the same thing, let’s disentangle the two notions.

Concurrency is the coordination of multiple, usually interleaved threads of execution that are accessing or modifying some shared state.

Parallelism involves state as well, but usually in the inverse. Being an optimization technique used to efficiently utilize all of the available resources (usually computational, but sometimes other resources, like bandwidth) to improve the performance of an operation, approaches to parallelization generally aim to maximize the window of exclusive access to state (or, often, chunks of state) so as to minimize coordination overhead. Rather than involving interleaved threads of execution, the multiple evaluations of a parallelized operation run simultaneously—sometimes on different CPU cores, other times on different physical machines entirely.

-- Clojure Programming 책 중에서 .. 


쉽게 설명하자면 

'동시성' 은 공유되는 자원에 대한 접근이나 변경을 주도하는 쓰레드들을 배치하는 작업에 관한 용어이고 

'병렬성' 은 공유될 수 있는 자원에 대한 최적화된 사용에 관한 용어입니다. 보통 쓰레드 배치나 이런 것은 당연히 적용하지만 잡-스케쥴링 (Job - scheduling) 을 통해서 다중 CPU 일 경우 각각의 CPU 나 코어 에서 작업을 분배시켜서 돌리게 하거나 또는 아예 다른 기계에서 작업을 돌리게 한다던지 와 같은 오히려 작업 분배에 관한 용어로 쓰일 때가 많습니다. 



 

+ Recent posts