profile image

L o a d i n g . . .

멀티 코어

https://murgon.tistory.com/38

 

멀티코어 CPU란

멀티 코어 CPU의 등장 등장 배경 2000년대 초반, 한계치 이상까지 CPU의 클럭을 끌어올리던 CPU 제조회사들은 2002년에 3GHz 클럭을 돌파하였다. 그것까지는 좋았다. 문제는 거기서 발생하는 발열, 엄

murgon.tistory.com

프로세스와 스레드

프로세스는 하나 이상의 쓰레드로 구성된다.

쓰레드: 하나의 프로그램 실행 흐름( Fetch-decode-execute)

https://murgon.tistory.com/3?category=1034734

 

프로세스와 스레드

프로그램 파일 시스템에 존재하는 실행 파일 프로세스 메모리에 적재되어서 실행되고 있는 프로그램. 실행되고 있는 프로그램의 인스턴스. (운영체제가 관리하는 작업의 단위.) 운영체제로부터

murgon.tistory.com

멀티 코어와 멀티 스레드

하나의 코어는 하나의 쓰레드를 실행한다.

멀티 코어 CPU(=멀티 코어 프로세서)는 가지고 있는 여러 개의 코어를 통해 동시에 여러 개의 쓰레드를 실행시킬 수 있다.

멀티 코어와 멀티 프로세스

모던 OS(운영체제)에서 스케줄링의 단위는 쓰레드이다. 프로세스가 아니다.

따라서, 멀티 코어 CPU에서는 병렬적으로 여러 개의 프로세스가 실행될 수 있다.

예시) 다음의 자원이 있다고 가정하자.
듀얼 코어 CPU (코어가 두개)
프로세스 A - (쓰레드 A1, 쓰레드 A2)
프로세스 B - (쓰레드 B1, 쓰레드 B2)

이 때, CPU 각각의 코어에 A1, A2, B1, B2 중 하나가 실행될 수 있는 것이다.
A1, B1 이 각각의 코어에서 병렬적으로 실행될 수도 있고, A1, B2가 병렬적으로 실행될 수도 있고, B1, B2가 병렬적으로 실행될 수 도 있다.

각 쓰레드들은 CPU 내 모든 코어에 스케줄링될 수 있으며, OS에 의해 로드 밸런싱된다.

이 예제에서 A1, A2 혹은 B1, B2 쓰레드가 동시에 실행될 수 있는 것처럼, 하나의 프로세스가 multi core에서 실행될 수도 있는 것이다.

참고

https://superuser.com/questions/257406/can-a-multi-core-processor-run-multiple-processes-at-the-same-time

 

Can a multi-core processor run multiple processes at the same time?

I understand that a multi-core processor can run multiple threads of the same process at the same time using its different cores. Can it also run multiple processes at the same time(each core runni...

superuser.com

https://cs.stackexchange.com/questions/29238/can-do-multiple-processes-run-simultaneously-on-a-multi-core-system

 

Can/Do multiple processes run simultaneously on a multi-core system?

I understand context switches and threading on a single core system, but I'm trying to understand what happens in a multi-core system. I know multiple threads from the same process can run simultan...

cs.stackexchange.com

https://stackoverflow.com/questions/38733670/can-a-single-process-run-in-multiple-cores

 

Can a single process run in multiple cores?

can a single process run different threads on different cores? (I think they can) In that case, different cores share the same address space but with different caches? Does that mean caches will be

stackoverflow.com

https://www.youtube.com/watch?v=QmtYKZC0lMU 

 

복사했습니다!