multithreading - What's the cost/overhead of thread context switch? -


what's cost/overhead of thread context switch? far know, there direct costs:

  1. saving , restoring context(generally,it includes general purpose registers , program counter)
  2. costs of thread scheduling(deciding thread next run)

and there maybe indirect costs, such as: if thread switched out arranged run in cpu later, might re-load variables main memory(or other cpu via coherence protocol), cache read miss might occur.

is there other indirect costs?


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -