From: "Giovanni Tusa" <gtusa@inwind.it>
To: <linux-kernel@vger.kernel.org>
Subject: sched_yield behavior
Date: Sun, 27 Feb 2005 11:58:06 +0100 [thread overview]
Message-ID: <00e901c51cbb$45b3cac0$65071897@gtusa> (raw)
Hi all,
I have a question about the sched_yield behavior of Linux O(1) scheduler,
for RT tasks.
By reading some documentation, I found that " ....real-time tasks are a
special case, because
when they want to explicitly yield the processor to other waiting processes,
they are merely
moved to the end of their priority list (and not inserted into the expired
array, like conventional
processes)."
I have to implement an RT task with the highest priority in the system (it
is also the only task within the
priority list for such priority level). Moreover, it has to be a SCHED_FIFO
task, so that it can preempt
SCHED_RR ones, because of its strong real-time requirements. However,
sometimes it should relinquish the
CPU, to give to other tasks a chance to run.
Now, what happen if it gives up the CPU by means of the sched_yield() system
call?
If I am not wrong, the scheduler will choose it again (it will be still the
higher priority task, and the only of its priority list).
I have to add an explicit sleep to effectively relinquish the CPU for some
time, or the scheduler can deal with such a
situation in another way?
Any advice will be appreciated.
Giovanni
next reply other threads:[~2005-02-27 10:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-27 10:58 Giovanni Tusa [this message]
2005-02-27 17:02 ` sched_yield behavior Lee Revell
2005-02-27 22:04 ` Nick Piggin
-- strict thread matches above, loose matches on Subject: below --
2005-03-01 11:15 gtusa
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='00e901c51cbb$45b3cac0$65071897@gtusa' \
--to=gtusa@inwind.it \
--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