摘要 |
<p>The present invention provides a method, system, and scheduler for simulating multiple processors in parallel. The scheduler create one or more slave threads using a master thread, and determines a processor that is simulated by the master thread and a processor that is simulated by a slave thread, so that the scheduler is capable of using the master thread and the one or more slave threads to invoke, through a first execute interface, the determined processor that is simulated by the master thread and the determined processor that is simulated by the slave thread to execute a corresponding instruction, where the first execute interface is registered with the scheduler by the determined processor that is simulated by the master thread and the determined processor that is simulated by the slave thread. Because the master thread and the one or more slave threads are able to be used to schedule a processor that is simulated by the master thread and a processor that is simulated by a slave thread each time, multiple processors are able to be simulated in parallel. This avoids a problem in the prior art that multiple processors cannot be simulated in parallel because only one processor is scheduled each time, thereby increasing simulation efficiency; meanwhile, processor resources of a host where the scheduler is located are able to be fully utilized, thereby improving resource utilization.</p> |