Multi-threaded virtual machine processing on a web page
First Claim
Patent Images
1. A computer-implemented method for processing resources on a multi-threaded browser, comprising:
- using a main thread included in the multi-threaded browser to initialize a plurality of virtual machines for processing a resource having a plurality of code segments wherein each virtual machine processes a respective code segment of the resource;
scheduling, using the main thread, a plurality of events for processing the plurality of code segments of the resource in parallel, wherein the scheduling further comprises for each event;
cooperatively mapping the main thread within the multi-threaded browser to a UI thread executing within a respective virtual machine;
activating a respective event handler within the UI thread of each respective virtual machine to assign the event in the cooperatively mapped main thread included in the browser to the UI thread included in the respective virtual machine; and
executing the event using the respective virtual machine.
2 Assignments
0 Petitions
Accused Products
Abstract
A system, method and a computer-readable medium for processing resources on a multithreaded browser. The browser includes a main thread and receives a resource. The browser initializes the main thread, the main thread includes an event loop and initializes a plurality of virtual machines, one virtual machine for each code segment within the resource. Each virtual machine includes a UI thread and is configured to share the main thread within the browser with the UI thread. Each UI thread is further configured to execute an event scheduled on the event loop on the virtual machine.
-
Citations
17 Claims
-
1. A computer-implemented method for processing resources on a multi-threaded browser, comprising:
-
using a main thread included in the multi-threaded browser to initialize a plurality of virtual machines for processing a resource having a plurality of code segments wherein each virtual machine processes a respective code segment of the resource; scheduling, using the main thread, a plurality of events for processing the plurality of code segments of the resource in parallel, wherein the scheduling further comprises for each event; cooperatively mapping the main thread within the multi-threaded browser to a UI thread executing within a respective virtual machine; activating a respective event handler within the UI thread of each respective virtual machine to assign the event in the cooperatively mapped main thread included in the browser to the UI thread included in the respective virtual machine; and executing the event using the respective virtual machine. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. The computer-implemented method for context switching on a multi-threaded browser, comprising:
-
processing within a first virtual machine having an event handler associated with a first UI thread on the first virtual machine a first event of a plurality of events for processing a resource having a plurality of code segments, the first virtual machine executing on the multi-threaded browser; receiving a call to access an event handler associated with a second UI thread on a second virtual machine, from the event handler associated with the first UI thread on the first virtual machine, the second virtual machine executing on the multi-threaded browser in parallel with the first virtual machine; mapping a main thread of the multi-threaded browser to the event handler associated with the first UI thread on the first virtual machine to retrieve a record including a memory state of the first virtual machine prior to a context switch; storing the record within the main thread of the multi-threaded browser; context switching the main thread from the first virtual machine to the second virtual machine; accessing a second event from an event loop within the main thread; executing the second event using the event handler associated with the second UI thread on the second virtual machine; and restoring the processing of the first event to the first virtual machine, once the execution of the second event on the second virtual machine is complete, wherein the restoring execution to the first virtual machine causes the main thread to access the record and restore a memory state of the first virtual machine to the memory state prior to the context switch. - View Dependent Claims (8, 9)
-
-
10. A system, comprising:
-
a processor coupled with a memory; and a multi-threaded browser stored in the memory and configured to execute a main thread on the processor to process a resource having a plurality of code segments; and
wherein the main thread is configured to;use the main thread included in the multi-threaded browser to initialize a plurality of virtual machines for processing respective code segments of the resource; and schedule, using the main thread, a plurality of events for processing the plurality of code segments of the resource in parallel, wherein the main thread is configured to schedule each event to; cooperatively map the main thread within the browser to a UI thread executing within a respective virtual machine; activate an event handler within the UI thread of each respective virtual machine to assign the respective event in the cooperatively mapped main thread included in the browser to the UI thread included in the respective virtual machine; and execute the respective event using the respective virtual machine. - View Dependent Claims (11, 12, 13, 14)
-
-
15. A system, comprising:
-
a processor coupled with a memory; a multi-threaded browser stored in the memory and executing on the processor a main thread; a first virtual machine executing on the multi-threaded browser and configured to; process within a first virtual machine having an event handler associated with a first UI thread on the first virtual machine a first event of a plurality of the events for processing a resource having a plurality of code segments; receive a call to access an event handler associated with a second UI thread on a second virtual machine, from the event handler associated with the first UI thread on the first virtual machine, the second virtual machine executing on the multi-threaded browser in parallel with the first virtual machine; the main thread configured to; map to the event handler of the first virtual machine to retrieve a record including the state of the first virtual machine; store the record within the main thread of the multi-threaded browser; access a second event from the event loop within the main thread; context switch from the first virtual machine to the second virtual machine wherein the second virtual machine executes the second event using an event handler associated with the second UI thread on the second virtual machine; and restore the processing of the first event to the first virtual machine, once the execution of the second event on the second virtual machine is complete, wherein the restoring execution to the first virtual machine causes the main thread to access the record and restore a memory state of the first virtual machine to the memory state prior to the context switch. - View Dependent Claims (17)
-
-
16. The system of 15, wherein the main thread includes a virtual memory invocation stack, and wherein the main thread is further configured to access the virtual memory invocation stack for the record of the first virtual machine to restore the execution.
Specification