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 -

c# - Can I intercept a SOAP response in .NET before a content type binding mismatch ProtocolException? -

css - Can I use the :after pseudo-element on an input field? -