1- Browser Architecture – Practice

So let’s take a look at Chrome is the corresponding browser architecture is what? When you open Task Manager, you’ll see that the browser opens with multiple processes (see more tools in Chrome -> Task Manager). .

Let’s take a look at chrome’s main processes.

  • Browser Process: The main Process of the Browser. There is only one Process.
    1. Responsible for address bar, bookmark bar, forward and back buttons, etc.
    2. Responsible for the management of each page, create and destroy other processes;
    3. Draw an in-memory Bitmap from the Renderer process onto the user interface.
    4. Handles the browser’s invisible low-level operations, such as network requests and file access;
  • Renderer Process: Default is one Process per Tab page.
    1. Page rendering, script execution, event handling, etc
  • Plugin Process: Each type of plug-in corresponds to one Process, which is created only when the plug-in is used
  • GPU Process: a maximum of one, used for 3D drawing, etc

What are the advantages/disadvantages of multi-process architecture?

advantage disadvantage
The crash of a single page does not affect the browser The memory of different processes cannot be shared. As a result, the same information exists in the memory of different processes
The plugin crash does not affect the browser
Multi-process makes full use of multi-nuclear advantages
It is more secure and restricts the permissions of different processes at the system level

To save memory, Chrome limits the maximum number of processes, which is determined by the memory and CPU capacity of the device. When this limit is reached, newly opened tabs will share the previous rendering process of the same site.

Chrome treats the functions of different browser applications as services that can be easily split into different processes or combined into a single process. Take the Broswer Process as an example. If Chrome is running on powerful hardware, it splits up the different services into different processes so that the overall Performance of Chrome is more stable, but if Chrome is running on resource-poor devices, the services are merged into the same Process. This saves memory.

That’s the basic architecture of the browser, but we haven’t even started to solve our initial problems. To review the questions:

“What does the browser do in the few seconds it takes to type a URL into the browser’s address bar?”

Next article

Problem – Overview