본문 바로가기

나의 FE피봇이야기/Dev_Knowledge

[Browser]CPU와 GPU를 통해 할당 받는 Process

 

Diagram of a process using memory space and storing application data

애플리케이션을 시작하면 프로세스가 생성됩니다. 프로그램이 작업을 돕기 위해 스레드를 생성할 수도 있지만 이는 선택 사항입니다. 운영 체제는 프로세스에 작업할 수 있는 메모리의 "슬래브"를 제공하며 모든 애플리케이션 상태는 해당 개인 메모리 공간에 보관됩니다. 애플리케이션을 닫으면 프로세스도 사라지고 운영 체제에서 메모리를 확보합니다.

When you start an application, a process is created. The program might create thread(s) to help it do work, but that's optional. The Operating System gives the process a "slab" of memory to work with and all application state is kept in that private memory space. When you close the application, the process also goes away and the Operating System frees up the memory.

 

 

 

다중 프로세스의 장점 in Chrome Browser

 

Diagram showing multiple processes running each tab

 

앞서 크롬이 여러 렌더링 프로세스를 사용한다고 언급했습니다. 가장 간단한 예로 각 탭에 자체 렌더링 프로세스가 있다고 상상할 수 있습니다. 3개의 탭이 열려 있고 각 탭이 독립적인 렌더러 프로세스에 의해 실행된다고 가정해 봅시다. 한 탭이 응답하지 않으면 응답하지 않는 탭을 닫고 다른 탭은 그대로 유지하면서 계속 진행할 수 있습니다. 모든 탭이 하나의 프로세스에서 실행 중인 경우 한 탭이 응답하지 않으면 모든 탭이 응답하지 않습니다. 안타까운 일이죠.

Earlier, I mentioned Chrome uses multiple renderer process. In the most simple case, you can imagine each tab has its own renderer process. Let’s say you have 3 tabs open and each tab is run by an independent renderer process. If one tab becomes unresponsive, then you can close the unresponsive tab and move on while keeping other tabs alive. If all tabs are running on one process, when one tab becomes unresponsive, all the tabs are unresponsive. That’s sad.

 

출처

https://developer.chrome.com/blog/inside-browser-part1/