| From | Subject | Date |
|---|---|---|
| Andriy Gapon | thread scheduling at mutex unlock
I am trying the small attached program on FreeBSD 6.3 (amd64,
SCHED_4BSD) and 7-STABLE (i386, SCHED_ULE), both with libthr as threads
library and on both it produces "BROKEN" message.
I compile this program as follows:
cc sched_test.c -o sched_test -pthread
I believe that the behavior I observe is broken because: if thread #1
releases a mutex and then tries to re-acquire it while thread #2 was
already blocked waiting on that mutex, then thread #1 should be "queued"
after thread #2 in mutex wai...
| May 14, 11:17 am 2008 |
| Andriy Gapon | Re: thread scheduling at mutex unlock
Daniel Eischen has just kindly notified me that the code (as an
attachment) didn't make it to the list, so here it is inline.
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <pthread.h>
pthread_mutex_t mutex;
int count = 0;
static void * thrfunc(void * arg)
{
while (1) {
pthread_mutex_lock(&mutex);
count++;
if (count > 10) {
fprintf(stderr, "you have a BROKEN thread scheduler!!!\n");
...
| May 14, 2:50 pm 2008 |
| previous day | today | next day |
|---|---|---|
| May 13, 2008 | May 14, 2008 | May 15, 2008 |
| Sitsofe Wheeler | Reading EeePC900 battery info causes stalls (was Re: How how latent should non-pre... |
| Rafael J. Wysocki | [Bug #10954] hda_intel: azx_get_response timeout, switching to polling mode: last ... |
| Artem Bityutskiy | [RFC PATCH 06/26] UBIFS: add superblock and master node |
| Alan Cox | Re: TALPA - a threat model? well sorta. |
git: | |
| Michael Hendricks | removing content from git history |
| Daniel Berlin | git annotate runs out of memory |
| Abdelrazak Younes | Git-windows and git-svn? |
| Shawn O. Pearce | Re: git-import.sh using git-fast-import |
| Darrin Chandler | Re: bcw(4) is gone |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Stuart Henderson | Re: SMTP flood + spamdb |
| Theo de Raadt | Re: Richard Stallman... |
| Johannes Berg | mac80211 truesize bugs |
| Mike Galbraith | Re: [tbench regression fixes]: digging out smelly deadmen. |
| Florian Wiessner | Re: POHMELFS high performance network filesystem. Transactions, failover, performa... |
| Jussi Kivilinna | [PATCH v2 2/2] [iproute2/tc] hfsc: add link layer overhead adaption |
