Date: Thu, 4 Feb 1999 22:09:36 -0500 (EST) From: "John S. Dyson" <dyson@iquest.net> To: dick@tar.com (Richard Seaman, Jr.) Cc: dufault@hda.com, jb@cimlogic.com.au, current@FreeBSD.ORG, bde@zeta.org.au Subject: Re: more about yield() versus sched_yield() Message-ID: <199902050309.WAA00824@y.dyson.net> In-Reply-To: <19990131094029.D29670@tar.com> from "Richard Seaman, Jr." at "Jan 31, 99 09:40:29 am"
next in thread | previous in thread | raw e-mail | index | archive | help
Richard Seaman, Jr. said: > > As I indicated to you several weeks ago, I think it is possible to have > a priority inversion problem in spinlocks that spin on sched_yield. > The yield call, as implemented, partly addresses the issue. However, > as you commented to me, it does so poorly. > > If the consensus is to drop or modify SYS_yield, my vote would be to > give consideration to changing the call to more correctly address the > priority inversion issue. Possibly a yield (pid_t pid) where the > pid passed in is the pid of the thread (process) holding a lock. The > system could then check the credentials of the pid to see if there > is permission (eg. its a kernel thread of the same process) and if > so, raise the priority of pid to that of the calling process for one > time slice so pid has a chance to execute and free the lock. > I didn't add the system call to the library (yet), because wasn't sure if it was working the way that I wanted. I do suggest that there be only one (yield) type system call, and if special behavior is desired, then give an argument describing the special behavior. I suggest that the yield that is kept should be the one where there is a current maintainer for it :-). -- John | Never try to teach a pig to sing, dyson@iquest.net | it makes one look stupid jdyson@nc.com | and it irritates the pig. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902050309.WAA00824>