728x90
반응형

다중스레드 3

멀티스레드 환경에서의 동기화(Synchronization)

?? 동기화가 뭐지?? 동기화의 목적은 스레드와 프로세스를 조정하는 것이다. ?? 왜 조정하는데...?? 바로 Critical Section(single process; non kernel object)의 경우 때문이다. 뜻은 같은 자원을 접근하는 코드를 말한다. -> critical section은 반복적으로 동작하는 2개 이상의 스레드가 하나의 자원을 공유할 때 발생한다. ***Resource (자원)이란 Memory location이나 Data structure, file 등을 말한다. Critical Section에 대해 조금 더 알아보자 이 말의 뜻은 "같은 자원을 접근하는 코드"이다. 얘도 또한 Object가 존재한다. (Win32 API가 제공) 또한 오직 하나의 스레드만 critical s..

다중 스레드 모델, Multithreading Models

이제 진짜 다중 스레드에 대해서 알아보려고 한다. 그래서 스레드도 2개의 종류로 나눠서 살펴보려고 한다. 한 번 보자 • User threads - management done by user-level threads library • Three primary thread libraries: POSIX Pthreads Windows threads Java threads • Kernel threads - Supported by the Kernel Examples – virtually all general purpose operating systems, including: Windows Solaris Linux Tru64 UNIX Mac OS X 사용자 스레드(User threads) , 커널 스레드(Kern..

다중 코어 프로그래밍 (Multicore programming)

영어도 보다보면 익숙해진다 보고가자 • Types of parallelism Data parallelism – distributes subsets of the same data across multiple cores, same operation on each Task parallelism – distributing threads across cores, each thread performing unique operation • As # of threads grows, so does architectural support for threading CPUs have cores as well as hardware threads Consider Oracle SPARC T4 with 8 cores, and 8 h..

728x90
반응형