pthread_setconcurrency man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



pthread_setconcurrency(3P)			    pthread_setconcurrency(3P)

NAME
     pthread_setconcurrency, pthread_getconcurrency - modify scheduling
     concurrency

C SYNOPSIS
     #include <pthread.h>

     int pthread_setconcurrency(int level);

     int pthread_getconcurrency(void);

DESCRIPTION
     Threads which are created with the PTHREAD_SCOPE_PROCESS attribute (which
     is the default) [see pthread_attr_setscope()], are scheduled on a number
     of kernel execution vehicles.  By default the number of execution
     vehicles used is adjusted by the library as the application runs and is
     called the concurrency level.  This is different from the traditional
     notion of concurrency because it includes any threads blocked by the
     application in the kernel (for example to do IO).	The library raises or
     lowers the level to maintain a balance between user context switches and
     CPU bandwidth.

     An application may choose to give the library a hint as to the best
     concurrency level by using the pthread_setconcurrency() interface.	 The
     level value indicates the concurrency that the application desires.  This
     value will be used to compute the ideal number of execution vehicles for
     scheduling PTHREAD_SCOPE_PROCESS threads.	If level is zero the library
     reverts to its default mode; adjusting the level itself.

     The pthread_getconcurrency() interface returns the current concurrency
     level requested by pthread_setconcurrency() or zero if the default
     concurrency mode is being used.

     Concurrency is a matter of performance not correctness; an application
     will function correctly using the default mode.  However the result may
     be overly conservative in its use of execution vehicles (and therefore
     CPUs).  In this case performance may be improved by setting the
     concurrency level explicitly.

     Conversely the library will not permit changes to the concurrency level
     to create starvation.  Should the application set the concurrency level
     to n and then cause n threads to block in the kernel the library will
     activate additional execution vehicles as needed to enable other threads
     to run.  In this case the concurrency level is temporarily raised and
     will eventually return to the requested level.

DIAGNOSTICS
     On success pthread_setconcurrency() returns zero; otherwise an error
     number is returned:

									Page 1

pthread_setconcurrency(3P)			    pthread_setconcurrency(3P)

     [EINVAL]	    The value of level is negative.

     pthread_getconcurrency() returns the current concurrency level (default
     is zero).

SEE ALSO
     pthread_attr_setscope(3P).

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net