k
Size: a a a
С
Using spinlock provides no protection from this under Linux. Futex or Mutex does under Linux. In theory you could lock your spinlock using process to a single core and avoid this but you have just lost the advantage of the multi core system.
Futex and Mutex will have a high idle time under Linux but that is because they are doing extra things to result in narrow range. This is the problem of averaging the run and not keeping the min and max value to get range.
k
С
V