Context switching between user threads is quite similar to switching between kernel threads,although it is dependent on the threads library and how it maps user threads to kernel threads.In general,context switching between user threads involves taking a user thread of its LWP and replacing it with another thread.This act typically involves saving and restoring the state of the registers.