Microbenchmark showing process-switching faster than thread-switching; what's wrong?
- by Yang
I have two simple microbenchmarks trying to measure thread- and process-switching overheads, but the process-switching overhead.
The code is living here, and r1667 is pasted below:
https://assorted.svn.sourceforge.net/svnroot/assorted/sandbox/trunk/src/c/process_switch_bench.c
// on zs, ~2.1-2.4us/switch
#include <stdlib.h>
#include…