The embodiment of the invention discloses a method and a device for threading a serial program in a nonuniform memory access
system, which relates to the multi-thread technical field, and can alleviate the worsening of properties of a multi-nuclear processor caused by the access and memory
delay difference when executing the serial program in the nonuniform memory access
system. The method comprises the steps that: the serial program to be processed is received; information of a multi-nuclear processor is acquired, and the information comprises an internet structure information of the multi-nuclear processor and at least one item in the access and memory
delay of each processor nuclear; a
usable cycling part of the serial program is threaded into an inferred thread, and a serial part and an unusable
cycling part of the serial program are threaded into a control thread; and the control thread and the inferred thread are allocated to the processor nuclear according to at least one of
the internet structure information and the
delay information. The method and the device are used for executing the serial program in a threading way in the nonuniform memory access
system supporting an inferred multi-thread mechanism.