wisemonkeys logo
FeedNotificationProfileManage Forms
FeedNotificationSearchSign in
wisemonkeys logo

Blogs

Linux Virtual Machine Process Scheduling

profile
Krishi Nagda
Aug 15, 2024
0 Likes
0 Discussions
66 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

Solving Problems with AI: The Power of Search Algorithms

Blog banner

How Does SSO Works

Blog banner

Modern Teaching Methods: Why Inquiry-based & Experiential Learning Works Best

Blog banner

Mesh Topology

Blog banner

Direct Memory Access

Blog banner

OLA

Blog banner

Global versus Indian Mental Health Differences

Blog banner

Challenges of Digital forensics in cloud computing environment

Blog banner

Race Condition

Blog banner

What is Email? Uses of Emails

Blog banner

Virtual memory

Blog banner

Dangers of Using Public WiFis

Blog banner

The 60-Minute Window: What to Do (And What NOT to Do) When You Knock Out a Tooth

Blog banner

Deadlock and Starvation

Blog banner

Emotional Suppression: The Hidden Costs Of Unfelt Feelings

Blog banner

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

Blog banner

Article on Fresh Book

Blog banner

Information Technology In E- Commerce

Blog banner

Survey of Which Movies Types people are Prefer to Watch in India.

Blog banner

Explain DBMS in Brief

Blog banner

How to Add Super Seeds to Your Everyday Meals: Easy & Healthy Ideas

Blog banner

RAID - LEVELS OF RAID

Blog banner

IP Address

Blog banner

Deadlock and Starvation

Blog banner

Design Considerations for Disk Cache Management

Blog banner

MOVEMBER

Blog banner

Operating system

Blog banner

What is Brute Force Attack? How to defend against it?

Blog banner

DEVELOPMENTS LEADING TO MODERN OPERATING SYSTEMS

Blog banner

Simple STEM Activities for Toddlers That Spark Curiosity

Blog banner

Senseless Teeths

Blog banner

Daycare Centres Help Children Transition into Structured Learning

Blog banner

Dental Problems That Start Small But Should Never Be Ignored

Blog banner

Im Photographer

Blog banner

Digital Balance: Keeping Children Mindful in the Screen Age

Blog banner

LIFEHACKER

Blog banner

Guidelines for a Low sodium Diet.

Blog banner

Can a Water Flosser Replace Manual Flossing? Here’s What Dentists Say

Blog banner

Career v/s Job : Choose your passion

Blog banner

RSA (Rivest-Shamir-Adelman) Algorithm

Blog banner

How Harshad Valia International School is nurturing India’s Young Minds?

Blog banner

Understanding Portion Control: How Much Food Do You Really Need?

Blog banner