windows - What is the performance cost of a Win32 process switch? -


i know cost of physical win32 thread context switch estimated @ between 2-8k cycles. estimates on cost of process switch?

instead of asking estimates, i'd test it. start program like:

#include <windows.h>  int main() {      (int i=0; i<1000000; i++)         sleep(0);     return 0; } 

then create parent program spawns (say) 32 copies of this, , uses waitformultipleobjects wait them finish. measure (wall) time start finish, , divide total number of process switches. of course, want run on relatively quiescent system meaningful result.


Comments

Popular posts from this blog

unicode - Are email addresses allowed to contain non-alphanumeric characters? -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

c++ - Convert big endian to little endian when reading from a binary file -