Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2008 12:01:14 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        "David Schwartz" <davids@webmaster.com>
Cc:        freebsd-stable@freebsd.org, freebsd-threads@freebsd.org
Subject:   Re: thread scheduling at mutex unlock
Message-ID:  <482BFBDA.6060705@icyb.net.ua>
References:  <MDEHLPKNGKAHNMBLJOLKCEGGMKAC.davids@webmaster.com>

next in thread | previous in thread | raw e-mail | index | archive | help
David Schwartz wrote:
> Are you out of your mind?! You are specifically asking for the absolute =
> worst possible behavior!
> 
> If you have fifty tiny things to do on one side of the room and fifty =
> tiny things to do on the other side, do you cross the room after each =
> one? Of course not. That would be *ludicrous*.
> 
> If you want/need strict alternation, feel free to code it. But it's the =
> maximally inefficient scheduler behavior, and it sure as hell had better =
> not be the default.

David,

what if you have an infinite number of items on one side and finite 
number on the other, and you want to process them all (in infinite time, 
of course). Would you still try to finish everything on one side (the 
infinite one) or would you try to look at what you have on the other side?

I am sorry about fuzzy wording of my original report, I should have 
mentioned "starvation" somewhere in it.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?482BFBDA.6060705>