主权项 |
1. A data processing method for executing a task code in a computer, wherein the computer runs an operating system to manage execution of a plurality of task codes, wherein the operating system manages a hardware thread pool which comprises multiple hardware threads, and wherein the method being performed by the computer by means of the operating system and comprises:
reading, by the operating system, a hardware thread reservation instruction preset in a start position of the task code, wherein the hardware thread reservation instruction comprises a hardware thread reservation request, and wherein the hardware thread reservation request is to request the operating system to allocate a reserved hardware thread in the hardware thread pool for executing the task code; allocating, by the operating system, the reserved hardware thread for executing the task code; loading, by the operating system, the task code to the reserved hardware thread such that the reserved hardware thread executes the loaded task code; and obtaining an execution result from the reserved hardware thread after the task code being executed. |