From: Jessica Yu <jyu@cowsay.org>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] [GSOC] plan9 kernel scheduler
Date: Sat, 21 Jun 2014 18:45:27 -0700 [thread overview]
Message-ID: <CACebkGPwBHsHwcshzNqhMrxjn4f8XJQ9gwAYdE26vE-vmovDhA@mail.gmail.com> (raw)
In-Reply-To: <F5C208E1-B0F9-4B22-B46F-4D16B108B477@fb.com>
+1 what Yoann said. :-) On SMP systems, all maches share a global run
queue, and maches tend to try grabbing procs that have run on it
before (affinity). Take a look at port/proc.c in particular, where a
lot of the scheduling logic is implemented.
On Sat, Jun 21, 2014 at 6:10 PM, Yoann Padioleau <pad@fb.com> wrote:
> 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 <ccuiyyan@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.
>
>
next prev parent reply other threads:[~2014-06-22 1:45 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-21 19:30 yan cui
2014-06-22 1:10 ` Yoann Padioleau
2014-06-22 1:45 ` Jessica Yu [this message]
2014-06-22 12:10 ` erik quanstrom
2014-06-23 16:06 ` Ramakrishnan Muthukrishnan
2014-06-23 16:30 ` erik quanstrom
2014-06-23 18:37 ` andrey mirtchovski
2014-06-24 1:33 ` Ramakrishnan Muthukrishnan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CACebkGPwBHsHwcshzNqhMrxjn4f8XJQ9gwAYdE26vE-vmovDhA@mail.gmail.com \
--to=jyu@cowsay.org \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).