[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878x6lwndp.fsf@suzuka.mcnaught.org>
Date: Tue, 02 Oct 2007 11:24:18 -0400
From: Douglas McNaught <doug@...aught.org>
To: "linux-os \(Dick Johnson\)" <linux-os@...logic.com>
Cc: "Ingo Molnar" <mingo@...e.hu>,
"David Schwartz" <davids@...master.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: yield API
"linux-os \(Dick Johnson\)" <linux-os@...logic.com> writes:
> Whether or not there is a POSIX definition of sched_yield(),
> there is a need for something that will give up the CPU
> and not busy-wait. There are many control applications
> where state-machines are kept in user-mode code. The code
> waits for an event. It shouldn't be spinning, wasting
> CPU time, when the kernel can be doing file and network
> I/O with the wasted CPU cycles.
These "control applications" would be real-time processes, for which
(AIUI) sched_yield() behavior is completely well-defined and
implemented as such by Linux. The question here is how useful the
call is for SCHED_OTHER (non-real-time) processes, for which it has no
well-defined semantics.
-Doug
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists