Thread Management Method and Apparatus
AssigneeHuawei Technologies Co., Ltd.
InventorsXianfeng Zhang, Zaishang Wang, Fei Sun, Jixiao Han
Life of this patent
Estimating the term…
Abstract
In a thread management method, an application first information to an operating system through an API. The first information is used to indicate at least one first task to be executed by the application. The operating system allocates, by using the first information, the at least one first task to be executed by the application to a corresponding first task queue, and allocates a thread to the first task queue based on a current load level of the operating system and a type of the first task queue.
Claims22
A thread management method implemented by an operating system, the thread management method comprising:
- determining, at least one piece of first information of a first application, wherein the first information indicates at least one first task to be executed by the first application;
- allocating the at least one first task to a corresponding first task queue;
- and
- allocating a first thread to the corresponding first task queue based on a current load level of the operating system and a type of the corresponding first task queue.
A thread management method implemented by an application, the thread management method comprising:
- submitting, when needing to execute a first task, first information to an operating system through a first application programming interface (API) corresponding to the first task, wherein the first information indicates the first task;
- and
- executing the first task using a first thread allocated by the operating system to the first task.
14-26. (canceled)
A terminal apparatus, comprising:
- a memory, configured to store program instructions;
- and
- at least one processor coupled to the memory and configured to invoke and execute the program instructions to cause an operating system of the terminal apparatus to:
- determine at least one piece of first information of a first application, wherein the first information indicates at least one first task to be executed by the first application;
- allocate the at least one first task to a corresponding first task queue;
- and
- allocate a first thread to the corresponding first task queue based on a current load level of the operating system and a type of the corresponding first task queue.
28-30. (canceled)
Dependencies are inferred from the claim text.