IP Library Granted Patent US 11,954,520
Granted Patent B2
US 11,954,520 · App. 16/725,880 · Granted Apr 9, 2024

Micro kernel scheduling method and apparatus

Inventors: Xu Zeng (Hangzhou, CN); Junjie Cai (Hangzhou, CN); Liangliang Zhu (Hangzhou, CN)
Assignee: Alibaba Group Holding Limited
G06F9/4881G06F9/30098G06F9/45558G06F9/545G06F2009/45562G06F2009/4557
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 11,954,520
App. No.
16/725,880
Granted
Apr 9, 2024
Kind
B2
Abstract

A micro kernel scheduling method and apparatus are disclosed in embodiments of this disclosure. The method is applied to a software platform and includes: receiving a scheduling instruction for a current micro kernel; and switching the current micro kernel to a target micro kernel. In some embodiments, a micro kernel is switched directly according to a scheduling instruction, and this is completed without any thread of the software platform, which solves the problems in the conventional system of high micro kernel switching cost and poor real-time performance caused by one-to-one correspondence between micro kernels and threads of the software platform.

Claims (43)

1. A micro kernel scheduling method, applied to a software platform, the method comprising:

receiving a scheduling instruction input by an external device to switch a current micro kernel to a target micro kernel that is executed in a host thread or a Kernel-based Virtual machine (KVM) that is executing on a software platform, wherein the current micro kernel and the target micro kernel are simplified version of a kernel of a real time operation system each having a corresponding micro kernel control unit of a CPU register and a corresponding control value of a register value;

in response to the receiving, executing a setjmp function and a longjmp function according to the scheduling instruction, wherein a scope of the longjmp is within a scope of the setjmp, and the executing comprising:

determining a first control value corresponding to the target micro kernel; and

replacing a second control value corresponding to the current micro kernel with the first control value of a register value; and

in response to executing the setjmp function and the longjmp function, switching the current micro kernel to a target micro kernel to execute in the host thread or the KVM on the software platform, wherein the current micro kernel after receiving the scheduling instruction executes the scheduling instruction to switch the current micro kernel to the target micro kernel independent of any communication of any micro kernels of the software platform to the host thread or the KVM of the software platform, wherein the software platform is a Linux platform.

2. The method of claim 1 , further comprising:

simulating software running with the target micro kernel.

3. The method of claim 1 , further comprising:

receiving an event message sent by the software platform; and

wherein the host thread and one of an agent thread or agent process are executed on the software platform, and receiving the event message sent by the software platform comprises:

sending, by the software platform, the event message to the agent thread or agent process;

forwarding, by the agent thread or agent process, the event message to the host thread;

converting, by the host thread, the event message to an interrupt event; and

receiving the interrupt event sent by the host thread.

4. The method of claim 3 , wherein sending, by the software platform, the event message to the agent thread or agent process comprises:

receiving, by the software platform, information input by an external device;

converting, by the software platform, the information to an event message; and

sending, by the software platform, the event message to the agent thread or agent process.

5. The method of claim 3 , further comprising:

sending a micro kernel event message to the software platform.

6. The method of claim 5 , wherein sending the micro kernel event message to the software platform comprises:

sending the micro kernel event message to the agent thread or agent process; and

forwarding, by the agent thread or agent process, the micro kernel event message to the software platform.

7. The method of claim 3 , wherein the agent thread or agent process has a corresponding entity that comprises a network card or virtual network card.

8. A micro kernel scheduling apparatus, applied to a software platform, the apparatus comprising:

a memory storing a set of instructions; and

at least one processor configured to execute the set of instructions to cause the apparatus to perform:

receiving a scheduling instruction input by an external device to switch a current micro kernel to a target micro kernel that is executed in a host thread or a Kernel-based Virtual machine (KVM) that is executing on a software platform, wherein the current micro kernel and the target micro kernel are simplified version of a kernel of a real time operation system each having a corresponding micro kernel control unit of a CPU register and a corresponding control value of a register value;

in response to the receiving, executing a setjmp function and a longjmp function according to the scheduling instruction, wherein a scope of the longjmp is within a scope of the setjmp, and the executing comprising:

determining a first control value corresponding to the target micro kernel; and

replacing a second control value corresponding to the current micro kernel with the first control value of a register value; and

in response to executing the setjmp function and the longjmp function, switching the current micro kernel to a target micro kernel to execute in the host thread or the KVM on the software platform, wherein the current micro kernel after receiving the scheduling instruction executes the scheduling instruction to switch the current micro kernel to the target micro kernel independent of any communication of any micro kernels of the software platform to the host thread or the KVM of the software platform, wherein the software platform is a Linux platform.

9. The apparatus of claim 8 , wherein the at least one processor is configured to execute the set of instructions to cause the apparatus to perform:

simulating software running with the target micro kernel.

10. The apparatus of claim 8 , wherein the at least one processor is configured to execute the set of instructions to cause the apparatus to perform:

receiving an event message sent by the software platform.

11. A non-transitory computer readable storage medium storing a set of instructions that are executable by one or more processing devices to cause a computer to perform a micro kernel scheduling method comprising:

receiving a scheduling instruction input by an external device to switch a current micro kernel to a target micro kernel that is executed in a host thread or a Kernel-based Virtual machine (KVM) that is executing on a software platform, wherein the current micro kernel and the target micro kernel are simplified version of a kernel of a real time operation system each having a corresponding micro kernel control unit of a CPU register and a corresponding control value of a register value;

in response to the receiving, executing a setjmp function and a longjmp function according to the scheduling instruction, wherein a scope of the longjmp is within a scope of the setjmp, and the executing comprising:

determining a first control value corresponding to the target micro kernel; and

replacing a second control value corresponding to the current micro kernel with the first control value of a register value; and

in response to executing the setjmp function and the longjmp function, switching the current micro kernel to a target micro kernel to execute in the host thread or the KVM on the software platform, wherein the current micro kernel after receiving the scheduling instruction executes the scheduling instruction to switch the current micro kernel to the target micro kernel independent of any communication of any micro kernels of the software platform to the host thread or the KVM of the software platform, wherein the software platform is a Linux platform.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Apr 29, 2026
From: ALIBABA GROUP HOLDING LIMITED
To: CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PRIVATE LIMITED
Reel/Frame 075499/0384 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 26, 2021
From: ZENG, XU; CAI, JUNJIE; ZHU, LIANGLIANG
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 055028/0318 →
Priority Claims (1)
CN 201710495861.5 · Jun 26, 2017 · national
Continuity (2)
Continuation PCTCN2018091040 · Jun 13, 2018
Related Publication 20200133723A1 · Apr 30, 2020