This application discloses a
processor sharing method and electronic device, relating to the field of
computer technology, comprising: configuring a target communication
directory for each business container when at least one business container is scheduled to a target processor; in response to a connection request initiated by a
client process within each business container based on the target communication
directory, and upon confirmation by a target
management process that a target
service process exists, establishing a communication connection between the
client process within each business container and the target
service process; merging the execution resources corresponding to the computing tasks sent by each
client process through the target
service process, and sending the merged shared execution resources to the target processor, so that the target processor concurrently schedules at least one business container based on the shared execution resources, thereby realizing the merging of multi-process execution resources and fine-grained concurrent scheduling of computing kernels, significantly reducing task switching overhead, and improving the
utilization rate of streaming multiprocessors and the overall computing efficiency of the processor.