RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-05 Thread David Schwartz
> David, > please try to reply courteously to queries by other people. > And specially > when you're the one who's wrong. Mohit is right - Linux had a > long standing problem where sched_yield() system call didn't work. It > was only fixed in Linux 2.4. Didn't work in accordance wit

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-05 Thread Rik van Riel
On Sun, 4 Feb 2001, Mohit Aron wrote: > you're expecting is lying in wait for me. Here is simple logic > for you to figure out - if you have one run queue, and two > threads calling sched_yield() (and hence theoretically putting > themselves at the end of run queue), perfect alternation should >

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread Mohit Aron
Thanks for a reasonable/thoughtful reply. > to expect perfect alternation is not reasonable. the scheduler > (or one of its subsidiary and/or supporting functions) decides what > should run and what shouldn't. the linux scheduler did have problems > in 2.2 (and still does in some places).

Re: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread Davide Libenzi
On Sunday 04 February 2001 21:50, Matt wrote: > in this case you will see that in 2.2.18 a SCHED_YIELD process will > get a "goodness" value of 0, however in 2.4.1-ac1 you will find that > it gets a value of -1 (and hence a lower scheduling priority). i dont > have a machine handy that is running

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread Matt
mohit, to expect perfect alternation is not reasonable. the scheduler (or one of its subsidiary and/or supporting functions) decides what should run and what shouldn't. the linux scheduler did have problems in 2.2 (and still does in some places). however last i checked sched_yield() is at

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread Robert Guerra
David, please try to reply courteously to queries by other people. And specially when you're the one who's wrong. Mohit is right - Linux had a long standing problem where sched_yield() system call didn't work. It was only fixed in Linux 2.4. > > Also, it is NOT unrealistic to expect perfec

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread Mohit Aron
> I'm using 2.4.1-pre10, glibc 2.1.3. And I'm using Linux 2.2. And the sched_yield bug exists in Linux 2.2. I found a huge number of posted bug reports on linux-kernel regarding this issue. Check http://boudicca.tux.org/hypermail/linux-kernel/2000week21/0858.html for one. > Threa

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread David Schwartz
> What version of Linux are you using ? What I see is the following: I'm using 2.4.1-pre10, glibc 2.1.3. > Thread1 > Thread1 > Thread1 > Thread1 > Thread1 > Thread2 > Thread2 > Thread2 > Thread2 > Thread2 That's totall

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread Mohit Aron
wartz [mailto:[EMAIL PROTECTED]] Sent: Sunday, February 04, 2001 3:09 AM To: Mohit Aron; [EMAIL PROTECTED] Subject: RE: system call sched_yield() doesn't work on Linux 2.2 The program you attached worked perfectly for me. You need to 'fflush(stdout);' after each 'printf&#x

RE: system call sched_yield() doesn't work on Linux 2.2

2001-02-04 Thread David Schwartz
The program you attached worked perfectly for me. You need to 'fflush(stdout);' after each 'printf'. You didn't expect perfect alternation did you? That's totally unrealistic. You cannot use the scheduler as a synchronization mechanism. -- Thread1 Thread1 Thread2 Thread1 Thread1 Thread2