This is the 12th day of my participation in the August More Text Challenge. For details, see: August More Text Challenge

Modern mainstream browsers use multi-process architecture, it is the multi-process architecture to ensure that the browser can be stable, smooth and safe operation, so that users can have a good browser web surfing experience, let’s take a look at the structure of the multi-process frame of the browser mystery

The browser has those processes

You can see in the browser which processes are included in the browser

Click the “Options” menu in the upper right corner of Chrome, select the “More Tools” submenu, and click “Task Manager”, this will open the Chrome Task Manager window, as shown below

As shown in the figure, The Chrome Browser consists of a Browser main process, a GPU process, a NetWork process, multiple rendering processes, and multiple plug-in processes

Browser process: mainly responsible for interface display, user interaction, child process management, and storage functions, including navigation bar, bookmark management, browser record, forward and back buttons, etc

Rendering process: The core task is to convert HTML, CSS, and JavaScript into web pages that users can interact with. Both the typographical engine Blink and the JavaScript engine V8 run in this process. By default, Chrome creates a rendering process for each Tab. For security reasons, rendering processes are run in sandbox mode

GPU process: Actually, When Chrome was first released, there was no GPU process. The original purpose of using GPU is to achieve the effect of 3D CSS, but later the web page and Chrome UI interface are chosen to use GPU to draw, which makes GPU become a common demand of browsers. Finally, Chrome introduces GPU processes on top of its multi-process architecture

Network process: mainly responsible for the page network resources loading

Plug-in process: It is mainly responsible for the running of plug-ins. Because plug-ins are prone to crash, you need to isolate them by plug-in process to ensure that the crash of plug-in process does not affect browsers and pages

Open a page, and there are several processes

How many processes exist when only one page is opened using a browser?

Through the above multi-process architecture, it can be obtained that there are at least four processes, because opening a page requires at least one network process, one browser process, one GPU process and one rendering process, a total of four; If the open page has a plugin running, you need to add another plugin process.

If another page were opened at this point, how many processes would exist on the page?

Before answering this question, we need to consider the influence of the same site. When the browser opens a new Tab page, if the page of the same site uses a rendering process, which can save the number of processes and improve performance. If not the same site, each page is a separate rendering process

Because the answer to this question needs to be based on whether the factors under consideration

If it is the same site, then the number of render processes remains the same

If not, a rendering process will be added to the number of existing rendering processes