Context switch internals
问题 I want to learn and fill gaps in my knowledge with the help of this question. So, a user is running a thread (kernel-level) and it now calls yield (a system call I presume). The scheduler must now save the context of the current thread in the TCB (which is stored in the kernel somewhere) and choose another thread to run and loads its context and jump to its CS:EIP . To narrow things down, I am working on Linux running on top of x86 architecture. Now, I want to get into the details: So, first