Previous | Next --- Slide 26 of 63
Back to Lecture Thumbnails
trip

Thinking back to cs140, there's quite a lot of action that the OS needs to do to get user programs runnable. I understand that we're learning about ways to modify programs to be more parallelizable, but how are our operating systems (more specifically threads in kernel mode) utilizing our processors? I get that a decent amount of kernel work is I/O bound, as chips are getting better suited for parallelism, are OS maintainers making strides to make their code more parallelizable by utilizing more of the processor when it can?

sasukelover420

@trip The OS is responsible for scheduling threads onto processors, which is a tradeoff between the amount of time any process gets to run on CPU (i.e. fairness), and the penalty of context switching. In Linux, the Completely Fair Scheduler (CFS) is able to do this with extremely high efficiency using a Red - Black Tree, so that given a set number of processes/threads, a thread can be selected to run in constant time.

Please log in to leave a comment.