TASK SCHEDULING METHOD AND APPARATUS
Abstract:
Data contention caused by multiple threads accessing one data block at the same time when used to execute tasks concurrently may be avoided, and difficulty in detecting and debugging a concurrent error may be reduced. A solution is: adding, according to correspondences between multiple tasks and M data blocks that are accessed by the multiple tasks, each of the multiple tasks to a task queue of a data block corresponding to the task; using N threads to execute tasks in N task queues of M task queues concurrently, where each of the N threads executes a task in a task queue of the N task queues, different threads of the N threads execute tasks in different task queues, and 2≤N≤M.
Public/Granted literature
Information query
Patent Agency Ranking
0/0