Scheduling and Schedulers
The basic unit of scheduling in Solaris is the kthread_t; in FreeBSD, the thread; and in Linux, the task_struct. Solaris represents each process as a proc_t, and each thread within the process has a kthread_t. Linux represents processes (and threads) by task_struct structures. A single-threaded process in Linux has a single task_struct. A single-threaded process in Solaris has a proc_t, a single kthread_t, and a klwp_t. The klwp_t provides a save area for threads switching between user and kernel modes. A single-threaded process in FreeBSD has a proc struct, a thread struct, and a ksegrp struct. The ksegrp is a "kernel scheduling entity group." Effectively, all three OSes schedule threads, where a thread is a kthread_t in Solaris, a thread structure in FreeBSD, and a task_struct in Linux.