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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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