wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Linux Virtual Machine Process Scheduling

profile
Krishi Nagda
Aug 15, 2024
0 Likes
0 Discussions
74 Reads

In the Linux VServer virtual machine (VM) facility, the allocation of processor time to multiple VMs is managed using a Token Bucket Filter (TBF). This system ensures that each VM receives a fair share of processing resources, particularly in environments with single or multicore processors.


Fraction of Processor Allocation

Processor Allocation Formula: The ratio of token generation rate (R) to the time interval (T) determines the fraction of a single processor's capacity allocated to a VM: 

R/T = Fraction of processor allocation


Linux VServer Token Bucket Scheme

For example, in a system with four cores, if a VM is intended to use the equivalent of one full core, R is set to 1, and T is set to 4.  

Overall System Limitation: The total fraction of processor time allocated to all VMs should not exceed the available processing power. If there are N VMs, the sum of their allocations must satisfy


Setting Parameters: S and M 

  • S (bucket capacity) and M (minimum threshold) are parameters that regulate how a VM behaves after utilizing its burst time. 
  • Burst Time (B) and Hold Time (H): After using the processor for a specified burst time B, the VM incurs a hold time H where it cannot resume operation until enough tokens accumulate. 
  • The desired values of S and M can be calculated using the following formula:

M=W*H*R/T

S=W×B×(1−R/T) 

  • W represents the scheduler's frequency (decisions per second).


Example Calculation:

  • For a VM limited to 1/2 of the processor time, allowed to run for 30 seconds with a 5-second hold time, and with the scheduler running at 1,000 Hz: 

M=1,000×5×0.5=2,500 tokens 

S=1,000×30×(1−0.5)=15,000 tokens


Significance

These formulas and parameters allow for precise control over how much processor time a VM can use and how long it must wait before resuming after depleting its allocated tokens. This ensures fair resource distribution and prevents any VM from monopolizing the CPU. 


Conclusion 

The TBF mechanism in Linux VServer is critical for managing processor allocation in environments with multiple VMs. By carefully configuring the parameters R, T, S, and M, system administrators can control VM behavior during bursts of activity, ensuring that all VMs receive their fair share of CPU time without overwhelming the system. 


Comments ()


Sign in

Read Next

Depression

Blog banner

Is it important to follow all the trends that come up on social media?

Blog banner

DATA BREACH CAUSES CHALLENGES PREVENTION AND FUTURE DIRECTIONS

Blog banner

Tea, Coffee, Red Wine, and Teeth: A Stain Survival Guide

Blog banner

c

Blog banner

Computer Forensics and its Impact in Business Environment

Blog banner

Evolution of Operating Systems

Blog banner

Spitting Pink in the Sink: Why Your Gums Randomly Bleed

Blog banner

The Impact of Tolerances and Wall Thickness on Pipeline Integrity

Blog banner

What is metaverse?

Blog banner

Deadlock

Blog banner

Concurrency and Deadlocks

Blog banner

Chicken Dum Biryani

Blog banner

E-security systems | CCTV

Blog banner

How to invest in Indian Stock Market ? ~ Tutorial 1

Blog banner

Digital Life And Mental Health: A Psychological Perspective in the Modern World

Blog banner

Memory Management

Blog banner

MEMORY MANAGEMENT

Blog banner

Process Description

Blog banner

Google App Engine

Blog banner

Fault Tolerance

Blog banner

Music

Blog banner

How to Find the Right Therapist For Me?

Blog banner

Quality check in IT services

Blog banner

Safeguarding Your Data: The Importance of Wireless Encryption

Blog banner

PHISHING

Blog banner

How chatGPT Is Changing SEO: What Every Business Needs to Know in 2026

Blog banner

(Input/Output) in os

Blog banner

Introduction to GIS

Blog banner

Life lesson

Blog banner

evolution of operating system - Disha Parekh

Blog banner

Deming’s Process

Blog banner

Mumbaicha Dabbawalla

Blog banner

Data-Driven Prediction of Virtual Item Prices in Online Games

Blog banner

Cherish the Craft — Essential Tips to Maintain Your Patola Collection

Blog banner

A Happier Workplace Starts with Healthy Lunches by Meal Maharaj

Blog banner

How to Grow Your Brand on YouTube Without a Big Budget

Blog banner

How to Avoid being a Victim of Cybercrime

Blog banner

How to Encrypt and Decrypt Using GNU PGP

Blog banner

objectives and functions of operating system

Blog banner

Process and Threading

Blog banner

10 Reasons to Date a South Indian Girl

Blog banner