Linux worker threads

Why is it sometimes necessary to create new workflows that perform deferred workflows and not just schedule it by default for the events / n workflow?

+3
source share
1 answer

Many tasks need to be multiplexed in the workflow stream of events, so he is not allowed to block it (call schedule () inside the same task). However, there are many tasks that need to be blocked (waiting for a disk, network, some device, etc.), and in the kernel, which is locked inside (like semaphores or even memory allocation), there are many functions. Such functions can only be performed on behalf of userland inside syscall or in a dedicated kernel thread.

, , .

+7

Source: https://habr.com/ru/post/1792980/


All Articles