Download presentation
Presentation is loading. Please wait.
Published byElla Nelson Modified over 9 years ago
1
Xen VMM Monarch Scheduler run queue Domain UDomain 0 Directly modifies the kernel memory … System Architecture process Accurate and Efficient Process Scheduling among Virtual Machines Hidekazu Tadokoro*Kenichi Kourai**Shigeru Chiba* * Tokyo Institute of Technology ** Kyushu Institute of Technology, JST CREST A process scheduler among VMs Achieves a custom scheduling policy in the whole system Monitors the execution of processes Using virtual machine Introspection (VMI) Changes the scheduling behavior of each guest Oses Using direct kernel object manipulation (DKOM) Supported guest OSes are Linux and Windows Vista (x64) Monarch Scheduler To suspend a process The Monarch scheduler removes it from a run queue if it is ready The Monarch scheduler changes the process state if it is waiting for an event or currently running The process stops spontaneously To resume a suspended process The Monarch scheduler changes the process state and inserts it into a run queue How to change scheduling policies in guest OSes Process CPU times accounted in guest OSes are inaccurate CPU times account depends on timer interrupts Timer interrupts are not always triggered regularly in VMs Because of virtualization Accessing the memory from Domain 0 is inefficient The Monarch scheduler needs to map many memory pages in Domain U With modifying a page table and flushing a TLB Challenging issues: Accuracy and Efficiency The VMM accounts process times for accuracy Using VMI with a technique called Antfarm. Antfarm enables recognizing the context switches of processes based on the CR3 register VMI enables associating the value of CR3 register to a specific process The Monarch scheduler is implemented in the VMM for efficiency The VMM does not need to map memory pages of Domain U It can directly access the memory pages Provides API of strongly typed languages To prevent the whole system being crashed Re-design for accuracy and efficiency void init() { d_all = get_domain_by_name(“.*”); p_all = get_task_by_name(d_all, “.*”); p_si = get_task_by_name(d_all, “SearchIndexer”); set_period(P); } void scheduler() { t_all = get_time(p_all, P); t_si = get_time(p_si, P); if (t_all – t_si > 0) suspend(p_si); else resume(p_si); } void init() { d_all = get_domain_by_name(“.*”); p_all = get_task_by_name(d_all, “.*”); p_si = get_task_by_name(d_all, “SearchIndexer”); set_period(P); } void scheduler() { t_all = get_time(p_all, P); t_si = get_time(p_si, P); if (t_all – t_si > 0) suspend(p_si); else resume(p_si); } Policy example: Idle-time scheduling Runs the indexing service only if the whole system is idle running ready blocked Process state transition Processes waiting for CPU Running on CPU run queue A process scheduler should consider all processes in all VMs Each process competes with the other processes E.g. Low-importance processes should not run if high-importance processes are running in other VMs However, a guest OS is not aware of the other OSes The VMM is not aware of processes Why system-wide process scheduling? Xen VMM Monarch Scheduler Domain U Track CPU times based on CR3 Associate the CR3 to a process Track CPU times based on CR3 Associate the CR3 to a process CR3 process1 process2 process1: 100 msec process2: 560 msec …
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.