Re: GSoC ticket #1069 (thread scheduler) application
Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> Thu, 12 Apr 2007 03:49:20 +0200
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On 2007-04-12 at 02:19:13 [+0200], André Braga <[email protected]> wrote: > On 4/11/07, Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> wrote: > > Please note that: (1) There are usually not that many threads waiting for > > a > > single semaphore anyway. (2) The most likely semaphore release operation > > is > > with count 1, i.e. only the frontmost thread in the semaphore's queue > > will be > > woken up. (3) Even in cases were all waiting threads are woken up (e.g. > > delete_sem()) some info for each one needs to be updated, so the > > operation is > > "O(n)" anyway. > > I might have a hidden ace on my sleeves... Who knows ;) Oohhh. :-) > Could you please explain what info must be updated on every thread? According to src/system/kernel/sem.c (I'd recommend to have a look, since you might modify a few things there, anyway) it's thread::state in any case and fields of thread::sem -- definitely count and potentially also acquire_status. CU, Ingo ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV