Wechat search [front-end full stack developer] pay attention to this hair loss, stall, selling goods, continuous learning programmer, the first time to read the latest article, will give priority to two days to publish new articles. Attention can be a gift package, you can save a lot of money!

Today’s browsers are more like operating systems than document viewers. Users are performing more and more tasks in browsers and fewer and fewer tasks in desktop applications. However, every Web page, Web application, and extension uses memory. As a result, users are often concerned about how memory usage affects their experience.

We are working to develop solutions to address this issue. These solutions include providing web site and extension developers with information to help them use fewer resources, and helping users understand how their browsing habits affect Microsoft Edge resource usage.

We’ll share more about Microsoft Edge’s memory usage in the coming months, starting with today’s article that delves into Microsoft Edge’s multi-process architecture. We hope this gives you insight into how Microsoft Edge uses your computer’s resources, how browsing habits affect resource usage, and how you can help us make Microsoft Edge even better.

How does a multi-process architecture help improve browser security and reliability

Many browsers are built using a multi-process architecture, which means that browsers are divided into different processes.

** This is the main process that helps manage Windows and tabs and controls Browser frameworks such as the address bar and the forward and back buttons. It can also route privileged access to utilities such as network requests and file access.

Renderer processes: ** These controls control how a website renders in its tabs by executing the code provided by the website. They handle HTML, CSS, JavaScript, images, and so on. The resource usage of each renderer process depends on the content being hosted.

**GPU process: ** This process is responsible for communicating with the GPU (graphics processing unit) and processing all GPU tasks. A GPU is a piece of hardware that can quickly perform graphics-related calculations and send the output to a display for display. Modern browsers use gpus to render web pages quickly.

Utility processes: Audio playback, network services, video capture, data decoding, and favorites are handled by these processes so that Microsoft Edge can control and audit access to these resources and coordinate the use of global system resources.

Plug-in processes and Extension processes: ** Plug-in processes contain active plug-ins, such as Adobe Flash, while extension processes contain active extensions. Each process executes the code provided by the plug-in or extension, and the resource usage of each process varies depending on the code provided. Each process also has code that allows plug-ins or extensions to communicate with the browser and renderer processes.

**Crashpad Handler Process: ** This tracks the health of different processes in Microsoft Edge. If Microsoft Edge crashes, this process will help the browser capture and transmit crash reports to Microsoft servers, which we use to find and fix crashes.

Now that we’ve seen what each process does, let’s look at an example of a process that will run for a user who has one TAB open and two extensions open in Microsoft Edge.

If the user opens Windows Task Manager, the process is displayed:

In this example, the user will see nine processes running:

  • The browser process of the browser framework
  • A GPU process that helps display graphics
  • A renderer process that is running the code provided by the sample site
  • A network service utility process that helps process network requests
  • Audio service utility process that helps play audio
  • A plug-in process that runs code provided by Flash
  • Two extension processes, one each, run the code provided by the extension
  • A CrashPad handler that monitors the health of Microsoft Edge

All of these processes written together give you the browsing experience you use today.

Now let’s look at another example. In the next example, the user has four tabs open and two extensions enabled (Figure 2). Each TAB has an AD (two from one source and two from another).

In this example, if the user opens task Manager, they see 14 processes running:

  • The browser process of the browser framework
  • A GPU process that helps display graphics
  • Six renderer processes:
    • Four TAB page renderer processes, each TAB has its own renderer process and runs the code provided by the site. Sometimes tabs from the same domain will share a process.
    • The renderer process for two ads. Ads from the same domain will share a process and will run the code provided by the AD. In this case, the two ads from the first source will share a process, and the two ads from the second source will share a separate process. These ads are embedded in web pages using what are called subframes. (We’ll talk more about subframes later.)
  • A network service utility process that helps process network requests
  • Audio service utility process that helps play audio
  • A plug-in process running Flash
  • Two extension processes, one each, run the code provided by the extension
  • A CrashPad handler that monitors the health of Microsoft Edge

Some examples are more complicated. You might see other processes for subframes that are not visible to you, or you might see projects (such as Service Workers or Web Workers) sharing processes with tabs or subframes. Service Workers and Web Workers are scripts that run in the background to improve performance and allow you to use some websites and applications without an Internet connection.

Chromium ‘s multi-process architecture: www.chromium.org/developers/…

Benefits of a multi-process architecture

Each process has a different purpose, and there are many factors that affect the total number of processes. So why does Microsoft Edge use this multi-process architecture?

Like other modern browsers, Microsoft Edge uses this architecture to improve security, reliability, and accountability for how the browser uses resources. Microsoft Edge is built on the Chromium project and shares a common implementation with other Chromium browsers.

Enhanced security

If the malware exploits a security hole in one renderer process, it can be difficult to escape that process and affect another.

The renderer process is the most vulnerable process because it is the process that interacts with the web site. The process has low privileges and has very limited access to the operating system, so if the malware controls the process, it will not be able to control the computer. The narrow and protected communication between the renderer process and the browser process makes it difficult for malware to take advantage of the browser process.

In addition, process isolation prevents one process from accessing another process’s memory, which also improves browser security. For example, suppose you are buying a shirt online and there is an advertisement on the site. The website you visit requires access to your credit card information to complete the transaction; However, advertising does not need access to this information. Ads will run their own process, so even if an AD is hacked, there is no easy way to access your sensitive information.

reliability

If a Web page, Web application, extension, or plug-in crashes, only the process that is crashing is affected, improving the reliability of the browser. The rest of the browser, including most of the other tabs, will remain stable.

Resource accountability

Isolating each process makes it easier to see in task manager which process is using the most resources and provides information about which resources are being used. What resources, websites, extensions or plug-ins do Microsoft Edge use the most? You can also see this information in Microsoft Edge’s internal Task Manager, which you can open by pressing Shift+Esc in Microsoft Edge, or go to the top corner of your browser and select Settings and more (…). > More Tools > Browser Task Manager.

Listen to your feedback

We recognize that people rely more on their browsers than ever before, and we want to be able to navigate the Web effortlessly. If you experience Microsoft Edge problems, please send us as detailed feedback as possible. Please include steps to reproduce the problem, the URL of the page you visited, diagnostic data, screenshots, and your email address so that we can provide you with more information via email. This will help us process your feedback.

Stay tuned for an upcoming blog post where we’ll learn how computers manage memory.

Microsoft Edge Privacy Whitepaper: docs.microsoft.com/en-us/micro…

— Allison Pastewka, Microsoft Edge Program Manager


Original text: blogs.windows.com/msedgedev