-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathSCHEDULING
31 lines (25 loc) · 1.54 KB
/
SCHEDULING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
There are two primary modes the qthreads library can run in: single-threaded
shepherds and multi-threaded shepherds. When the library was first designed,
shepherds were single-threaded, and so that is the mode that has been the most
well-tested. In the future, multi-threaded shepherds (with work-stealing) will
be the default, but it hasn't been as well tested. Single-threaded shepherds do
not do any work-stealing, so their queues can be simpler: there is only ever
one dequeuer.
In single-threaded shepherd mode, the following schedulers are available:
nemesis
In multi-threaded shepherd mode, the following schedulers are available:
sherwood, distrib
Brief descriptions of each option follow:
Distrib: Like sherwood, but creates a double ended queue for each worker within
a shepherd, and spread the work across those queues to reduce contention. Also
comes with condwait enabled by default.
Nemesis: This is a lock-free FIFO queue based on the NEMESIS lock-free queue
design from the MPICH folks. It is extremely efficient, as long as FIFO is
the scheduling order that you want.
Sherwood: This is a scheduler policy designed by the MAESTRO project centered
around double-ended queue. This design uses mutexes to protect those
queues. The basic idea is that there is one queue per shepherd, shared
among the multiple workers within that shepherd. Among those workers
sharing the queue, a LIFO scheduling order is used. When doing
work-stealing between shepherds, a FIFO scheduling order is used. See
http://doi.acm.org/10.1145/1988796.1988804 for details.