Context switching between two threads of execution within the operating system is usually performed by a small assembly language function. In general terms, what does this small...

      

Context switching between two threads of execution within the operating system is
usually performed by a small assembly language function. In general terms, what does this
small function do internally?

  

Answers


Faith
Saves the current registers on the stack, then stores the stack pointer in the current thread’s control
block. We then load the stack pointer for the new thread’s control block and restore the registers it had
saved, from its stack.
Titany answered the question on April 26, 2022 at 05:17


Next: Enumerate the advantages and disadvantages of supporting multi-threaded applications with kernel-level threads
Previous: What is a race condition? Give an example

View More Operating Systems Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions