multithreading - What's the cost/overhead of thread context switch? -
what's cost/overhead of thread context switch? far know, there direct costs:
- saving , restoring context(generally,it includes general purpose registers , program counter)
- 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
Post a Comment