From: "Thierry Brown" <thierrybingo@googlemail.com>
To: linux-kernel@vger.kernel.org
Cc: thierrybingo@googlemail.com
Subject: Linux Kernel 2.6 CPU scheduler
Date: Mon, 8 Oct 2007 16:17:23 +0100 [thread overview]
Message-ID: <90bced5d0710080817m7bb2a471tf533db0c9294fffb@mail.gmail.com> (raw)
Hi-
I wish to be personally CC'ed the answers/comments posted to the list
in response to this post
I am new to Linux. i was reading about CPU scheduling in general and
that of Linux Kernel 2.6 in particular. I have three main questions:
1- Assume that the upper [higher priority] queue is empty and that the
lower queue contains a thread Th2. The latter is assigned to the CPU
for a Quantum period of, say 30 ms. after 10 ms from its execution, a
new thread Th1 is admitted to the upper queue. as such Th2 is pre-
empted. Th1 is having the CPU.
At this context switch, will Th2 be switched to the expired array
queue? i guess no. Then when Th2 is assigned to the CPU again, will
its assigned quantum reset to 30 ms, or instead to 30-10.
2- i can't see the need of the expired array queue. according to what
i have read, if any thread wants to use the cpu for a longer time than
their assigned quantum, it will be stopped and put in one of the
expired priority queues.
Is there any reference which details how the new assigned priority
queue is selected?
What this expired array queue is needed?
Why not assign the stopped thread to one of the active array queues
obviously after thread priority recalculation?
By assigning a stopped thread Th to the expired queues array, we are
sure that the threads at the bottom of the actives queues will be
executed. however those threads could not be as important as Th which
has to wait until the active queues are run first before getting their
turn. probably , maintaining one array of active threads ONLY is
better? Am i missing something regarding the role of expired queues
array
3-is there any book / website which details the practical kernel
algorithms supported with code tracing or snippets
thank you for your time :)
reply other threads:[~2007-10-08 15:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=90bced5d0710080817m7bb2a471tf533db0c9294fffb@mail.gmail.com \
--to=thierrybingo@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
/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®