1. An apparatus for reducing stalling in a pipeline of a processor having a simultaneous multithreading function, the apparatus comprising: a fetching unit for fetching, in accordance with a priority of a thread, an instruction from a buffer prepared for each thread; a decoding unit for decoding a fetched instruction; a dispatching unit for dispatching a decoded instruction; and a plurality of executing units able to execute a dispatched instruction and detect a stalling; a table for registering pairs of an instruction and resource information of the processor used by the instruction in an order each instruction is executed; wherein each executing unit, in response to detection of stalling, identifies and registers, based on data dependency, a second instruction on which a first instruction being executed is dependent, wherein each executing unit identifies the second instruction by retrieving an entry related to the second instruction registered in the table before an entry related to the first instruction using resource information of the processor used by the first instruction as a key; and wherein the fetching unit determines whether a fetched instruction is the second instruction, and in response to a determination of being the second instruction, the apparatus switches from the thread being executed to another thread ready to be executed before the first instruction is fetched, wherein the fetching unit, in response to a match between the instruction fetched from a buffer of the thread being executed and the second instruction, switches a buffer from which the instruction is to be fetched from the buffer of the thread being executed to another buffer of the other thread, and wherein registration of the second instruction is performed by storing an address in a predetermined table, by using one bit in an instruction cache line, or by a combination of storing an address in a predetermined table and using one bit in an instruction cache line.