Notes and Reflections on Books and Media
by Hannah Leitheiser
linux kernel development, 3rd edition
continuing on linux kernel development, 3rd edition by robert love. on the first pass, i'm just getting a general overview. so here's a general overview of processes in linux:
the photo shows a few of the processes running on my machine. uid is the user id, which is me, i guess. pid is the process id. ppid is the parent process id. linux generates new processes by forking, and you'll notice a lot of processes have kthreadd as their parent -- this is the kernel thread daemon.
then you have rtprio - real time priority - and ni - nice value. both relate to the same idea -- how willing is a process to give some of its share of processor time to others. the -20 nice values are not nice -- kworker wants as much time as it can get. 0 is the default in user space. 19 is the nicest value.
love talked about the trade-offs and issues involved in multitasking. fast process switching means no process has to wait long for its turn, but increases overhead. some processes are processor-bound (mostly for crunching numbers and the like), some are i/o-bound (a text editor spends most of the time waiting for keys to be typed). a smart kernel has to get both types appropriate segments of time.