How Web Browsers use Process & Threads; Chrome vs Firefox

Bimali Wickramasinghe
3 min readJul 16, 2020

--

A process is an instance of a program. In other words, it is an executing program in an application. A thread is a lightweight process which is inside the main process that helps in execution. A process can be executed by one or more threads. When an application is started, a process is created with or without threads to help it execute. So, there can be processes with or without threads.

Multi threading and Multiprocessing

Multi threading is an ability in the operating system that support multiple and concurrent paths of execution within a single process.

Multiprocessing is the ability in the operating system to support several programs to run at the same time.

Multiprocessing web browsers

Let’s see how the web browser is built. There’s no standard method to build a web browser but it can be built with one process with multiple threads or multiple processes with few threads. And most of the top browsers we use today uses multiprocessing. Multiprocessing browsers are more rash resistant. The main process is known as a tab/ renderer/ content process.

Both Chrome and Firefox free browsers we use today that support multi threading but in different ways. Let’s see how those two browsers work.

Google Chrome

Chrome is the first browser with multi process architecture. It uses multiprocessing architecture. Chrome’s architecture has a one main process (browser process), a one GPU process, dedicated process for each extension, dedicated process for each tab

Each tab you open creates its own tab (content) process. If one tab becomes unresponsive it doesn’t affect the other opened tabs. You can close the unresponsive tab without affecting other tabs. This maximize the performance. But because of this behavior it consumes more space in the main memory and requires more power.

Chrome’s add on library is the biggest library. The interface is well responsive and east to use. Though it is fast, Chrome’s RAM consumption is higher than the Firefox’s. Chrome has a high security. It has a built-in pop-up add blocker and it uses Google Safe Browsing in order to block malicious websites. Chrome is weak in keeping the user’s privacy.

Mozilla Firefox

Firefox was a single process browser in the beginning. Today it has improved its architecture to support multi threading. Firefox’s architecture has a one main process, a one GPU process, a one extension process, four(4) tab processes

Only the first four tabs use four tab (content) process threads by default and each other new tab you opens use threads within those previous processes. Multiple tabs share the browser engine that already exist in the main memory. A new tab doesn’t create their own browser engine. This approach uses less memory space and less power consumption. But if a tab becomes unresponsive the other tabs related to that process becomes unresponsive.

Firefox’s add-on library is not as bigger as Chrome. Firefox has a clean user interface and very easy to use. It is among the fastest web browsers that is used both in desktop and mobile in the world. The RAM consumption is lower than Chrome. Firefox has a built-in pop-up ad blocker. It is secure as it uses Google’s Safe Browsing database. The browser receives frequent updates and it updates automatically. Firefox tops Chrome in privacy. It has excellent tracking control.

--

--

Bimali Wickramasinghe
Bimali Wickramasinghe

Written by Bimali Wickramasinghe

Demostrator in Software Engineering, University of Kelaniya Sri Lanka

No responses yet