3 ms·
Surely if a process is running multiple Isolates simultaneously, they're multi threaded and still require context switching? (accepted, thread switches are les
by wizofaus 4y ago
Surely if a process is running multiple Isolates simultaneously, they're multi threaded and still require context switching? (accepted,
thread switches are less resource intensive than process switches). Interestingly when Chrome runs on Windows desktops it seems to allocate separate processes for each Isolate anyway, but I'm guessing this is not baked into V8?
- eatmyshorts 4y agoV8, at its core, is single-threaded. I think that's the reason for separate processes for each isolate.
- mhio 4y agoA V8 isolate is single threaded and you get 1 by default, but other isolates can be created and used in parallel in multiple threads.
- kentonv 4y agoThread switching is much cheaper than process switching. Threads are just stacks. Processes are whole address spaces. All kinds of caches need to be flushed when you switch processes (especially if you have more processes than you have PCID entries), but not when switching threads.