Get the latest tech news
Linux Context Switching Internals: Process State and Memory
How does the Linux kernel represent processes and their state: A breakdown of task_struct and mm_struct
A Note from the Author:I am also releasing this series of articles on Linux Context Switching Internals in the form of a short ebook which is currently at an early-access discount at the below link. The remaining fields in the thread_struct object are to save the kernel mode values of the segment registers ( es, ds, fs, and gs) during context switching. For X86-64, it contains two key fields which are critical during context switches, as they help the kernel decide if a flush of the translation lookaside buffer (TLB) is needed or not.
Or read this on Hacker News