From: Mike Kravetz <kravetz@us.ibm.com>
To: shreenivasa H V <shreenihv@usa.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: scheduler policy
Date: Thu, 13 Sep 2001 21:14:31 -0700 [thread overview]
Message-ID: <20010913211431.A1021@w-mikek2.sequent.com> (raw)
In-Reply-To: <20010914022756.9487.qmail@nwcst280.netaddress.usa.net>
In-Reply-To: <20010914022756.9487.qmail@nwcst280.netaddress.usa.net>; from shreenihv@usa.net on Thu, Sep 13, 2001 at 09:27:56PM -0500
On Thu, Sep 13, 2001 at 09:27:56PM -0500, shreenivasa H V wrote:
> Hi,
>
> In process scheduling, when an epoch ends because of the current process
> completing its time quantum (and all the runnable ones having finished their
> respective quantums), at the start of the new epoch, will the current running
> process retain the cpu (assuming all the runnable ones are of the same
> priority)?
Short answer, for UP kernels yes.
If all the tasks on the runqueue have the same priority (nice value),
then they will all (almost) have the same goodness value at the start
of the new epoch. However, tasks with the same memory map as the
currently running task will get their goodness value boosted by 1.
The next task to run will be the first one found that has the same
memory map as the currently running task. The check for 'still_running'
ensures that the the currently running task will be found first.
Not sure if this is by design, but this is what the code does.
Also, note that this is only true for UP kernels. In SMP, there
are other factors to consider and a level of unpredictability
due to racing with other CPUs as a result of dropping the runqueue
lock during the 'recalculate' operation.
--
Mike Kravetz kravetz@us.ibm.com
IBM Linux Technology Center (we're not at Sequent anymore)
next prev parent reply other threads:[~2001-09-14 4:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-14 2:27 shreenivasa H V
2001-09-14 4:14 ` Mike Kravetz [this message]
2001-09-14 16:10 ` Mike Kravetz
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=20010913211431.A1021@w-mikek2.sequent.com \
--to=kravetz@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shreenihv@usa.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
all inboxes | Powered by JetHome®