Patent ID: 9619277
Date: 2017-04-11
CPC Classifications: G06F

Claim:
1. A computer, comprising: a plurality of processors sharing a run queue, which is a process queue; and a memory in which a process stack is configured, wherein a plurality of dispatcher stacks, which are data structures, corresponding to the plurality of processors respectively are configured in the memory, wherein each processor is configured to, prior to releasing a held stack, acquire another stack not held by any other processor and release the held stack thereafter, wherein, each processor is configured to, in a dispatch process for switching the process that is running, (A) save a context of a switching-source process, which is the process that is running, to a stack held by the switching-source process, (B) acquire a dispatcher stack corresponding to the processor, release the switching-source process stack, and save a dispatcher context to the acquired dispatcher stack, (C) insert the switching-source process in the run queue, (D) remove a switching-destination process from the run queue, and (E) acquire a stack held by the switching-destination process, release the dispatcher stack that is being held, and restore a switching-destination process context from the stack acquired from the switching-destination process, wherein the dispatch process includes a dispatch entry process that includes (A) and (B) processes, a dispatch main process that includes (C) and (D) processes, and a dispatch exit process that includes an (E) process, wherein the dispatch entry process includes a process for saving the dispatch entry process caller information, and a process for calling the dispatch main process, wherein the dispatch main process further includes a process for calling the dispatch exit process, and wherein the dispatch exit process further includes a process for returning to the dispatch entry process caller shown by the caller information saved by the dispatch entry process.