Patent ID: 8392932

Claim:
An information processing device for causing a processor to execute a plurality of threads by switching therebetween, each of the threads performing a process in correspondence with an obtainment of an event, the information processing device comprising: a storage unit storing a plurality of contexts in correlation with the plurality of threads; a scheduling unit causing a first thread among the plurality of threads to transit from an execution state to a non-execution state, selecting a second thread to be executed next from among the plurality of threads, and causing the second thread to transit to the execution state; a first detection unit, when the first thread is caused to transit to the non-execution state, detecting whether or not a next processing start position, of the first thread when the first thread transits back to the execution state a next time, belongs to a processed part that has already been processed in correspondence with the obtainment of the event; a context correlation unit (i) storing into the storage unit a context that has been set in the processor, the context being correlated with the first thread, and the context being stored when the first detection unit detects that the next start position does not belong to the processed part, and (ii) not storing into the storage unit the context correlated with the first thread when the first detection unit detects that the next start position belongs to the processed part; a second detection unit, when the second thread is caused to transit to the execution sate, detecting whether or not a processing start position of the second thread belongs to the processed part; and a setting unit (i) not setting in the processor a context correlated with the second thread when the first detection unit detects that the next start position belongs to the processed part and the second detection unit detects that the processing start position of the second thread belongs to the processed part, and (ii) setting in the processor the context correlated with the second thread when the second detection unit detects that the processing start position of the second thread does not belong to the processed part, wherein when, during the setting of the context correlated with the second thread of the processor, the setting unit detects that the context correlated with the second thread is not stored in the storage unit, the setting unit sets an initial context in the processor to specify the processed part as the processing start position.