Where is The Value of the Current Stack Pointer Register Stored Before Context Switching In POSIX C Threads
This depends entirely upon how the Posix library is implemented. If the threads are implemented by the OS, the values of all registers are stored in the thread's [process] context block before a context switch.
if the thread are implemented in a library, the registers have to be stored in some data structure managed by the library. Such a library implementation needs to save all the general registers but does not (and cannot) need to save the process-specific kernel registers.
When should be process context switching faster over thread's one?
So i got the answer of this question. (From teacher)
Process Switching can be Faster than Thread Switching in 1 case
When there are 2 Processes:
The thread switching between two threads of two different processes is slower than Process switching between two processes
Related Topics
Bash "Declare -A" Does Not Work on MACos
New Scala Worksheets Not Evaluated in Eclipse
Matlab Mex Socket Wrapper Library
Fast Linux File Count for a Large Number of Files
Systemd with Multiple Execstart
Using Sed to Split a String with a Delimiter
Is There a Good Way to Detect a Stale Nfs Mount
Ldconfig Error:"Is Not a Symbolic Link" When Using Linux Loader
How to Split Mailbox into Single File Per Message
Chrome Certificate Selection Appears Multiple Times
Bash: Best Architecture for Reading from Two Input Streams
Dyld_Library_Path Environment Variable Is Not Forwarded to External Command in Makefile on MACos
Unable to Pass Wget a Variable with Quotes Inside the Variable
Connect to Host Localhost Port 22: Connection Refused