NuwaTemplateProcess: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Line 37: Line 37:
== IPC ==
== IPC ==
IPC of Gecko/B2G is comprised by various protocols.  The peers of a protocol instance are represented by a pair of actors; For example PBlobParent and PBlobChild are base classes of PBlob actors of parent and child side respective.  PBlob* are generated by the IPDL code generator.  Nuwa does not do any special for child actors for parasite processes since a new memory space are created and COW.  But, for parent actors in the parent process, Nuwa should clone them and replace their IPC channels with new ones.  Nuwa process will create new socket pairs for actors as the IPC channel between the new parasite process and the parent process.
IPC of Gecko/B2G is comprised by various protocols.  The peers of a protocol instance are represented by a pair of actors; For example PBlobParent and PBlobChild are base classes of PBlob actors of parent and child side respective.  PBlob* are generated by the IPDL code generator.  Nuwa does not do any special for child actors for parasite processes since a new memory space are created and COW.  But, for parent actors in the parent process, Nuwa should clone them and replace their IPC channels with new ones.  Nuwa process will create new socket pairs for actors as the IPC channel between the new parasite process and the parent process.
[[File:IPC_socketpairs.png]]


For running IPC between Nuwa process and the parent process, the IO thread and the main thread should not be frozen.  For the main thread, no any special should be done, it just continue the control flow after fork.  But, for the IO thread, it should create a parasite point just before the fork to tell Nuwa where to restart the thread. See
For running IPC between Nuwa process and the parent process, the IO thread and the main thread should not be frozen.  For the main thread, no any special should be done, it just continue the control flow after fork.  But, for the IO thread, it should create a parasite point just before the fork to tell Nuwa where to restart the thread. See
Confirmed users
398

edits

Navigation menu