|
|
|
work stealing
|
|||
|---|---|---|---|
|
#18+
concurrency in practiceWork stealing is well suited to problems in which consumers are also producers—when performing a unit of work is likely to result in the identification of more work. For example, processing a page in a web crawler usually results in the identification of new pages to be crawled. Similarly, many graph-exploring algorithms, such as marking the heap during garbage collection, can be efficiently parallelized using work stealing. When a worker identifies a new unit of work, it places it at the end of its own deque (or alternatively, in a work sharing design, on that of another worker); when its deque is empty, it looks for work at the end of someone else’s deque, ensuring that each worker stays busy. не могу что-то понять о чем речь. Первую фразу понял, что Work stealing подходит для таких случае когда consumer является продюсером. Дальше чего-то не понял я примеров. Можете мысль про краулер и the identification of more work ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.02.2017, 22:50 |
|
||
|
work stealing
|
|||
|---|---|---|---|
|
#18+
questioner Можете мысль про краулер и the identification of more work Конечно можем. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.02.2017, 23:19 |
|
||
|
work stealing
|
|||
|---|---|---|---|
|
#18+
Смысл в том, что при выполнении таска может возникнуть необходимость в запуске новых тасков. Когда парсишь страницу там находятся линки на другие страницы, которые надо добавить в очередь и тд. Почти все рекурсивные алгоритмы, обход графов и т.д. Но подходит != только лишь. Work stealing более универсальная вещь. FJP в Java реализован на основе него, если не изменяет память ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 13.02.2017, 23:22 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=39403808&tid=2123154]: |
0ms |
get settings: |
11ms |
get forum list: |
20ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
96ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
57ms |
get tp. blocked users: |
2ms |
| others: | 235ms |
| total: | 445ms |

| 0 / 0 |
