3 ms·
Most registers including x86 segment registers need to be saved during context switches, regardless of its between threads or processes. E.g segment registers u
by xorblurb 9y ago
Most registers including x86 segment registers need to be saved during context switches, regardless of its between threads or processes. E.g segment registers used for TLS. There are maybe optimisation for flat segments.
> Context switching when dealing with threads is typically done in software, not in hardware
I'm not sure any OS exists that does register saving in HW for switches between processes and in SW for switches between threads. Its especially doubtful for Linux, given it does not really have a very strong concept of what is a process vs. what is a thread.