Re: posix scheduler



On Aug 13, 11:38 am, aaadam <apps...@xxxxx> wrote:
Hi,

I'm confused about scheduling pthreads in RTP when using posix scheduler.
How does it works? Can every pthread have different scheduler?

Not a different scheduler, but a different scheduling policy
(SCHED_FIFO, SCHED_RR, etc.).

What is "Concurrent scheduling"?

This is referring to the fact that user-side pthreads can each have a
different scheduling policy.

[...]
but in next page:
"VxWorks does not support the POSIX thread-concurrency feature, as all
threads are scheduled. The POSIX thread-concurrency APIs are provided
for application portability, but they have no effect."

This paragraph is specifically referring to the pthread_setconcurrency
() and pthread_getconcurrency() API. These API are a mean for the
application to tell the scheduler how many threads the application
desires to be simultaneously active in a process. The scheduler may
ignore the hint. This feature applies only to systems where the
scheduler schedules only the processes; then the pthread
implementation has to manage the threads that should run within the
scheduling slot assigned to the process. VxWorks is not in this
category.

Hope this clarifies things,

--
PAD
.



Relevant Pages

  • Re: Will Thread blocking in read() leads to process blocking?
    ... >> pthreads does not block the whole process. ... > incorrect to believe that a POSIX conformant implementation won't ... > the kernel scheduler know about threads". ... > avoid that the all the LWPs mapped to one kernel thread gets blocked. ...
    (comp.unix.programmer)
  • Re: Will Thread blocking in read() leads to process blocking?
    ... >incorrect to believe that a POSIX conformant implementation won't ... >the kernel scheduler know about threads". ... >avoid that the all the LWPs mapped to one kernel thread gets blocked. ... >implemented by the Pthreads lib, ...
    (comp.unix.programmer)
  • Re: Does pthreads in Linux create user or kernel space threads?
    ... The book gave me the impression that all pthreads libs is in user ... relating to how the "pthread" you create is scheduled onto a ... scheduling efficiency comes into play here in your final performance results; but a "really good" N:M scheduler may even give some advantages over a poor 1:1 scheduler in some cases.) ...
    (comp.programming.threads)
  • Re: Add wakeup_with() before 7.0?
    ... >> I propose to add a new api for wakeup before 7.0. ... >> accept a wait channel and a flags argument. ... >> This allows wakeup callers to hint the scheduler about various ...
    (freebsd-arch)
  • Re: Pthread spin locks
    ... I have no idea why POSIX added spinlocks. ... those systems you generally also have policies for scheduler control ... It also assumes that the implementation of non-spin mutexes ...
    (freebsd-hackers)

Loading