Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-25 Thread Graeme Geldenhuys
Op 2010-06-24 16:57, Hans-Peter Diettrich het geskryf: synchronziation, but IMO not threads are bad per se, instead the assumptions of the author simply are impractical. With such assumptions the use of shared files, filesystems or other resources are bad as well Plus the author is quick

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-25 Thread Michael Schnell
On 06/24/2010 04:57 PM, Hans-Peter Diettrich wrote: or neglects the existence of realtime systems, As I usually do embedded stuff, I had exactly this impression, too. If realtime demands need to be considered, concurrent execution(i.e. threads) not only serves the purpose of speeding things up,

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Graeme Geldenhuys
Op 2010-06-24 11:06, Graeme Geldenhuys het geskryf: * Dynamic priorities have a range of -20..20 Just to f*ck with you even more, this range is now switched around. -20 is real-time 0 is normal 20 is idle And here is why I say it is wrong... rtl/unix/tthread.inc

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Paul van Helden
Hi All, Threads are evil? http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf Interesting view point. Perhaps that is why FPC doesn't bother too much about thread priorities? :-) Regards, Paul. ___ fpc-devel maillist -

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Hans-Peter Diettrich
Graeme Geldenhuys schrieb: Looking at the rtl/unix/cthread.pp unit, I noticed two $Warning lines sayin that setting or getting thread priority is not implemented for any unix system. WHAT??? I then thought I would go ahead and do the implementation. Seeing that cthreads using libc and POSIX

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Graeme Geldenhuys
On 24 June 2010 13:44, Hans-Peter Diettrich wrote: Thus priorities should only be considered as *hints* to the scheduler, with unpredictable consequences on arbitrary machines. When an application is So is there a kernel default which applies to most popular Linux distros? If there is, does

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Jonas Maebe
On 24 Jun 2010, at 15:05, Graeme Geldenhuys wrote: Also does multiple schedulers apply to other non-Linux platforms too? eg: OSX, FreeBSD, NetBSD, Haiku, etc. Because currently any unix-type platform doesn't have Thread Priority support in FPC. The POSIX pthread_setschedparam() api is not

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Graeme Geldenhuys
Op 2010-06-24 16:25, Jonas Maebe het geskryf: The POSIX pthread_setschedparam() api is not really appropriate in this case. It's mainly geared at real-time threads, which is why POSIX I also tried to use Google to see if there is any other way of setting thread priority, and all Google

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Jonas Maebe
On 24 Jun 2010, at 16:46, Graeme Geldenhuys wrote: --[ Kylix 3 Help ]--- Policy Type Priority -- SCHED_RR Real Time 1-99 SCHED_FIFO Real Time 1-99

Re: [fpc-devel] Linux thread priority mess (and possible implementation)

2010-06-24 Thread Hans-Peter Diettrich
Paul van Helden schrieb: Threads are evil? http://www.eecs.berkeley.edu/Pubs/TechRpts/2006/EECS-2006-1.pdf Interesting view point. Perhaps that is why FPC doesn't bother too much about thread priorities? :-) IMO the author neglects the existence of realtime systems, which have to deal