본문 바로가기

CS/멀티코어 컴퓨팅

멀티코어 컴퓨팅 - Important Concepts in Concurrent Programming

728x90
  • Concurrency / Parallelism : logically / Physically simutaneius processing

동시성/병렬성: 논리적/물리적으로 동시에 처리되는 것

  • Sychronization: coordication of simutaneous events(thread/ processes) in order to obtain correct runtime order and avoid unexpected race condition.

동기화: 올바른 실행 순서를 얻고 예기치 않은 경쟁 상태를 피하기 위해 동시적 이벤트(스레드/프로세스)를 조정하는 것

  • Mutual Exclusion : ensuring that no two processes or threads are in their critical section at the same time

상호배제: 두 개 이상의 프로세스나 스레드가 동시에 임계 영역에 들어가지 않도록 보장하는 것

  • Critical Section : a piece of code that accesses a shared resource (data structure or device) that must not be concurrently accessed by more than one thread of execution

임계 영역: 공유 자원(데이터 구조 또는 장치)에 접근하는 코드 조각으로, 하나 이상의 실행 스레드가 동시에 접근하지 못하도록 해야 한다.

  • Race Condition : a type of flaw in an electronic or software system where the output is depent on the sequence or timing of other uncontrollable events .

경쟁 상태: 출력이 다른 제어 불가능한 이벤트의 순서나 타이밍에 따라 달라지는 전자나 소프트웨어 시스템의 결함 유형.

  • semaphore(세마포어) : a synchronization object that maintains a count between zero and a specified maximum value. The count is decremented each time a thread completes a wait for the semaphore object and incremented each time a thread release the semaphore. when the count reaches zero, no more threads can successfully wait for the semaphore object state to become signaled.

세마포어: 0부터 지정된 최대값 사이의 값을 유지하는 동기화 개체. 스레드가 세마포어 개체를 기다리고 스레드가 세마포어를 해제할 때마다 개수가 감소한다. 카운트가 0이 되면 더 이상 스레드가 세마포어 개체가 시그널 상태가 될 때까지 성공적으로 기다릴 수 없다.

  • concurrent hash map : a hash table supporting full concurrency of retrievals and adjustable expected concurrency for updates.

동시성 해시 맵: 검색의 완전한 동시성과 업데이트에 대한 조절 가능한 예상 동시성을 지원하는 해시 테이블.

  • copy on write arrays : CopyOnWriteArrayList behaves as a List implementation that allows multiple concurrent reads. and for reads to occur concurrently with a write. the way it does this is to make a brand new copy of the list every time it is altered.

복사본 배열: CopyOnWriteArrayList는 여러 개의 동시 읽기를 허용하는 List 구현체처럼 작동한다. 읽기는 쓰기와 동시에 발생할 수 있도록 하며, 이를 위해 변경할 때마다 새로운 복사본을 만든다.

  • Barrier : a type of synchronization method. A barrier for a group of threads or processes in the source code means anty thread/process must stop at this point and cannot proceed until all other threads/proceesses reach this barrier

바리어: 동기화 방법 중 하나. 소스 코드에서 일련의 스레드 또는 프로세스에 대한 바리어는 어떤 스레드/프로세스도 이 지점에서 멈추고 다른 모든 스레드/프로세스가 이 바리어에 도달할 때까지 진행하지 못하도록 하는 것을 의미한다.