Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libpthread



In Message <20030416183045.928D8B004%cvs.netbsd.org@localhost> ,
   Nathan J Williams <nathanw%netbsd.org@localhost> wrote:

=>
=>Module Name:  src
=>Committed By: nathanw
=>Date:         Wed Apr 16 18:30:44 UTC 2003
=>
=>Modified Files:
=>      src/lib/libpthread: pthread_cond.c pthread_mutex.c
=>
=>Log Message:
=>When a thread sleeps on a mutex or cv, have it put itself on the
=>front of the sleep queue rather than the back. This is more
=>cache-friendly behavior and within the (lack of) constraints on wakeup
=>ordering imposed on equal-priority threads.

   Does this introduce a greater likelihood of starving other
waiting threads? Perhaps it would make sense to do something like
putting the thread on the back of the queue every kth sleep (which
could be randomly selected, or via a counter), just to give any
other waiting threads a shot.

                                        Gary Duzan





Home | Main Index | Thread Index | Old Index