From: george anzinger <george@mvista.com>
To: Jaswinder Singh <jaswinder.singh@3disystems.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Task Switching in Linux
Date: Mon, 11 Jun 2001 15:45:34 -0700 [thread overview]
Message-ID: <3B254A0E.F08CDB6E@mvista.com> (raw)
In-Reply-To: <011701c0f2b5$4d2d7140$50a6b3d0@Toshiba>
Jaswinder Singh wrote:
>
> In Linux , If we assume that there are only 2 tasks A and B and both are
> equal , this is correct or not :-
>
> TASK A -> schedule -> switch_to -> TASK B -> schedule -> switch_to ->
> schedule -> switch_to -> TASK A.
>
Heck no. TASK A will be run until it either blocks or its time quantum
drops below TASK B's. It does not matter how many times it calls
schedule(), 'cept its a darn waste of time.
Now, it you call sched_yield() your chances are higher, but still no
guarantee. If you get the tasks out of SCHED_OTHER sched_yield() will
do the above (if they have the same priority).
George
next prev parent reply other threads:[~2001-06-11 22:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-06-11 20:30 Task Switching in Linux Jaswinder Singh
2001-06-11 22:45 ` george anzinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-06-12 2:02 Rick Hohensee
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=3B254A0E.F08CDB6E@mvista.com \
--to=george@mvista.com \
--cc=jaswinder.singh@3disystems.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