From a085b1eaafcfe1d0a4cd457e0c11b7016556d93e Mon Sep 17 00:00:00 2001 From: Jie Deng Date: Fri, 24 Sep 2021 10:58:30 +0800 Subject: [PATCH] doc: update two scheduling algorithm Add description for the IORR (IO sensitive Round Robin) scheduler and the priority based scheduler. Signed-off-by: Jie Deng Signed-off-by: Yifan Liu --- doc/tutorials/cpu_sharing.rst | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/doc/tutorials/cpu_sharing.rst b/doc/tutorials/cpu_sharing.rst index 2b8f2a9f8..b93f3f751 100644 --- a/doc/tutorials/cpu_sharing.rst +++ b/doc/tutorials/cpu_sharing.rst @@ -86,8 +86,9 @@ Scheduler ********* The below block diagram shows the basic concept for the scheduler. There -are two kinds of schedulers in the diagram: NOOP (No-Operation) scheduler -and BVT (Borrowed Virtual Time) scheduler. +are four kinds of schedulers in the diagram: NOOP (No-Operation) scheduler, +the IO sensitive Round Robin scheduler, the priority based scheduler and +the BVT (Borrowed Virtual Time) scheduler. By default, BVT is used. - **No-Operation scheduler**: @@ -99,16 +100,27 @@ and BVT (Borrowed Virtual Time) scheduler. tries to keep resources busy, and will run once it is ready. The idle thread can run when the vCPU thread is blocked. +- **IO sensitive Round Robin scheduler**: + + The IORR (IO sensitive Round Robin) scheduler supports multiple vCPUs running + on one pCPU, scheduled by a IO sensitive round robin policy. + +- **Priority based scheduler**: + + The priority based scheduler can support vCPU scheduling based on their + pre-configured priorities. A vCPU can be running only if there is no + higher priority vCPU running on the same pCPU. For example, in some cases, + we have two VMs, one VM can be configured to use **PRIO_LOW** and the + other one to use **PRIO_HIGH**. The vCPU of the **PRIO_LOW** VM can + only be running when the vCPU of the **PRIO_HIGH** VM voluntarily relinquishes + usage of the pCPU. + - **Borrowed Virtual Time scheduler**: BVT (Borrowed Virtual time) is a virtual time based scheduling algorithm, it dispatches the runnable thread with the earliest effective virtual time. - TODO: BVT scheduler will be built on top of prioritized scheduling - mechanism, i.e. higher priority threads get scheduled first, and same - priority tasks are scheduled per BVT. - - **Virtual time**: The thread with the earliest effective virtual time (EVT) is dispatched first. - **Warp**: a latency-sensitive thread is allowed to warp back in