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

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -