The invention relates to a virtual
central processing unit (CPU) scheduling method; belongs to the technical field of computer
virtualization; and solves the problem that existing virtual CPU scheduling methods adopts
fixed length time slices to perform scheduling on all virtual CPUs, accordingly
virtual machine performance is affected due to resource limit. The virtual CPU scheduling method comprises the steps of initializing, updating virtual CPU credit values, joining the
queue, selecting running the virtual CPU,
processing integrated optics (OI) request
bitmap, and running. The virtual CPU scheduling method sets scheduling time slices according to virtual CPU running state, during virtual CPU scheduling, and dynamically sets the scheduling time slices of the virtual CPU according to the IO request
bitmap and a scheduling time slice table of a
virtual machine which the virtual CPU belongs; the OI request
bitmap reflects running characters of each
virtual machine, accordingly virtual machines mainly basing on CPU operation have small switching overhead, virtual machines mainly basing on OI operation have short
response delay, and further the effects of being suitable for various different application environment and meeting different application service type requirements are achieved.