打开新标签时,谷歌浏览器究竟做了什么? [英] What does the Google Chrome exactly do when a new tab is opened?
问题描述
今天,我观察到一个有趣的行为.我使用的是 windows XP-sp3 操作系统.
当我在 Google Chrome 中打开一个新标签时查看任务管理器,创建了一个新进程.
但是,一段时间后,此过程终止.
Today, i observed an interesting behavior. I am using windows XP-sp3 OS.
When i open a new tab in Google Chrome & view the task manager, a new process is created.
But, after some time, this process is terminated.
为什么会出现这种行为?是因为系统调用vfork()
?子进程是否立即调用exec()
?
Why it is showing such kind of behavior? Is it due to system call vfork()
? Does the child process immediately call exec()
?
这种情况是否只发生在 Google Chrome 或所有其他浏览器的行为方式类似?
Does it happen only with Google Chrome or all other browsers behave in a similar fashion?
推荐答案
AFAIK Chrome 为每个选项卡维护一个进程,也为某些插件维护一个进程.他们更喜欢多进程架构而不是多线程架构,因为当您制作始终与网络通信的网络应用程序时,您可能会收到可能导致内存混乱的数据包.因此,拥有多进程将阻止除一个进程之外的所有进程,而不是多线程会杀死选项卡.
AFAIK Chrome maintains one process for each tab, also one process for some plugins too. They preferred multi-process architecture over multi-threaded one because when you are making network application which communicate with network all the time, you can expect to receive packets which can garble the memory. So having multi-process will prevent all but one process, as opposed to multi-threaded will kill the the tabs.
您可以通过以下博客启发自己:
You can enlighten your self on following blog:
http://blog.chromium.org/2008/09/多进程架构.html
这篇关于打开新标签时,谷歌浏览器究竟做了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!