if you look in sys/src/9/port and grep for functions like sched() schedinit() runproc() updatecpu() repriotirize()
you'll get the logic of the scheduling algorithm. It's mostly priority queue fair robin I think, with a few hooks to prefer reschedule on the same CPU. Context switching is done with the gotolabel() setlabel() mmuswtich() taskswitch() On Jun 21, 2014, at 12:30 PM, yan cui <ccuiy...@gmail.com> wrote: > Hi all, > > On SMP or multicore systems, what algorithm(s) does Plan 9 use to > schedule(context switching and load balancing) different tasks (process or > thread) and where is it implemented? I searched some plan9 documents, but > cannot find some about this topic. Any recommendations? > > > Thanks, Yan > > -- > Think big; Dream impossible; Make it happen.