1. A computer system comprising an OS (operating system) and a software component operating as one or more tasks running on the OS, the computer system further comprising: an OS interrupt handler and an OS task, each having the function of running on the OS and issuing an API (application program interface); a first API processor having the function of outputting an instruction for changing a task state of the OS, based on an API issued by one of the OS interrupt handler and the OS task; a second API processor having the function of outputting an instruction for changing a task state of the OS, based on an API for the software component; an instruction storage for storing instructions output from the second API processor in order and outputting the instructions in the order that the instructions are stored; an instruction synchronization timing controller for receiving an output of the first API processor and an output of the instruction storage as inputs, preferentially selecting, among the inputs, the instruction output from the instruction storage, and outputting the selected instruction; a scheduler for processing an instruction output from the instruction synchronization timing controller, thereby selecting a task to be operated; and a context switcher for executing task switching for the OS according to a selection made by the scheduler.