Patent ID: 8595745

Claim:
An image processing apparatus comprising: a primary storage device storing processes, of plural types, that are to be executed sequentially; a secondary storage device; and a processor configured to execute: a processing task that sequentially executes the processes stored in the primary storage device; a recording task that records history information regarding at least two processes, each having a type that belongs to one of the plural types of processes, successively executed by the processor; a determination task that determines one or more types of the plural types of processes, that should be swapped-in from the secondary storage device to the primary storage device based on both the type, of the plural types of processes, of a process executed by the processor most recently and the history information recorded by the recording task; and a swapping task that swaps-in, from the secondary storage device to the primary storage device, one or more processes of the one or more types of the plural types of processes that should be swapped-in as determined by the determination task, wherein the at least two successively executed processes have a leading process executed first and at least one following process executed next, wherein the history information shows a relationship between the leading process and the at least one following process, and includes the number of executions of each of the at least one following process that has been executed after the type of the plural types of processes of the leading process has been executed, and wherein the determination task refers to the history information and then determines one or more types of the at least one following process, whose number of executions is larger than that of other types of the plural types of processes, that should be swapped-in from the secondary storage device to the primary storage device.