Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the 'Google Chrome Renderer' multi-processes, not multi-threaded? [closed]

Every time I load a browser tag in Chrome on my mac, the application forks another process. This seems to be different from how firefox or Safari work. What was the reason why Google stayed away from multi-threading in this case? The problem to be solved here (rendering multiple pages at once would seem in my mind to be a prime candidate for muti-threading, or?

like image 958
Jackson Henley Avatar asked Jun 24 '13 04:06

Jackson Henley


People also ask

Is Google Chrome multi-threaded?

Chrome has a multi-process architecture and each process is heavily multi-threaded. In this document we will go over the basic threading system shared by each process. The main goal is to keep the main thread (a.k.a. “UI” thread in the browser process) and IO thread (each process's thread for receiving IPC) responsive.

Why are there multiple Chrome processes running?

Function of Multiple Chrome ProcessesBy separating out each tab and extension into a separate process, the browser can remain active even if a single tab has to close. Using multiple processes also results in faster surfing speeds as computer memory is allocated only to the currently open tab.

Is browser single threaded or multi-threaded?

While Web Applications are granted a single thread, the Main Thread, to run most of their application and UI logic, Web Browsers are absolutely not a single threaded (or single-process) environment.

What are the three processes that Google Chrome browser can run as multi-process Web browser?

The browser creates three types of processes: tabs, renderers, and plug-ins. In other words, it uses a multi-process architecture. To check what processes are running on Chrome, go to More tools and then select Task Manager.


1 Answers

Running each page (or tab) in a separate process allows Chrome to provide a bit more security against page rendering bugs, as well as browser plug-ins that run within a process. Basically, if one page crashes, it won't affect other tabs. Instead, you'll get an "Aw Snap!" message.

enter image description here

From the docs:

We use separate processes for browser tabs to protect the overall application from bugs and glitches in the rendering engine. We also restrict access from each rendering engine process to others and to the rest of the system. In some ways, this brings to web browsing the benefits that memory protection and access control brought to operating systems.

like image 139
Mike Christensen Avatar answered Nov 15 '22 06:11

Mike Christensen