Browser Hang Mitigation via Thread Segmentation and Feedback

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Web browsers often face compatibility issues with newer versions, leading to hang conditions when executing third-party code, which can freeze tabs or windows, forcing users to shut down and relaunch the browser.

Innovation Solution

Implementing a system where a first thread monitors a second thread for hang conditions by issuing a hang resistance message and entering a mitigation state if no response is received within a predetermined time, allowing the browser to continue functioning and enabling user interaction despite the hang condition.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If the browser executes third-party code in a tab or window, then the web application functionality is provided, but the tab or window may hang or freeze, forcing the user to shut down and relaunch the browser

Engineering Contradiction:
Improveweb application compatibilityVSAvoidbrowser stability
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The browser is divided into multiple independent threads: a first thread that processes user input and navigation, and a second thread that executes third-party code. This segmentation isolates the unstable third-party code execution to a separate thread, preventing it from causing the entire browser to hang while maintaining web application functionality.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

A message queue system acts as an intermediary between the first thread and the second thread. The first thread can send messages to the second thread for processing, and the second thread processes messages from the queue. This intermediary mechanism allows the browser to maintain responsiveness in the first thread while the second thread handles potentially hanging third-party code execution.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If the browser runs older browser versions to ensure compatibility with legacy web applications, then compatibility is maintained, but the browser becomes more prone to errors and hang conditions

Engineering Contradiction:
Improvelegacy application compatibilityVSAvoiderror resistance
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The browser architecture segments legacy web application execution into a dedicated second thread that handles third-party code, while the first thread maintains modern browser functionality. This allows the system to run legacy applications without requiring the entire browser to operate in an older, less reliable mode.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system changes the operational parameters of thread execution by implementing asynchronous message processing and timeout detection. When the second thread fails to respond within a predetermined time period, the system detects the hang condition and transitions to a mitigation state, allowing the first thread to continue operating with modified parameters that maintain browser responsiveness.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If the browser implements comprehensive monitoring of thread execution to detect hang conditions, then hang detection capability is improved, but the system complexity increases

Engineering Contradiction:
Improvehang condition detectionVSAvoidthread monitoring system
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The first thread implements feedback monitoring by sending messages to the second thread and waiting for responses within a predetermined time period. This feedback mechanism provides simple yet effective hang detection without requiring complex monitoring infrastructure, as the absence of a timely response directly indicates a hang condition.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The second thread monitors its own execution state by processing messages from its queue and responding to the first thread. This self-service approach allows the thread to detect its own hang conditions without requiring external monitoring mechanisms, reducing overall system complexity while maintaining reliable detection.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11036365B2Hang condition mitigation for browser applications
Publication Date: 2021.06.15 MICROSOFT TECHNOLOGY LICENSING LLC
  • US11036365B2 patent drawing
  • US11036365B2 patent drawing
  • US11036365B2 patent drawing

AI summary

Methods, systems, and computer program products are provided for detecting a browser hang condition and causing the browser to enter into a mitigation state. For instance, a window or tab of the browser executes via a first thread of the browser, and third-party code executes via a second thread of the browser. The first thread issues a hang resistance message to the second thread and waits for a response from the second thread. The second thread processes the hang resistance message after processing all other messages in its queue. Thus, if the first thread receives the response, the first thread determines that the second thread has not entered into a hang condition. However, if the first thread does not receive the response, the first thread determines that the second thread has entered into a hang condition and subsequently causes the browser to enter the mitigation state.