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

Natural Language Processing(NLP)

Blog banner

EVOLUTION OF MICROPROCESSOR

Blog banner

BIRYANI ! The history you never knew about

Blog banner

How To Invest in Indian Stock Market For Beginners. ~ Tutorial 2 (NSDL And CSDL) Continued...

Blog banner

Memory heirachy (Operating system)

Blog banner

Buffer Overflow

Blog banner

India Digital Personal Data Protection Act, 2023

Blog banner

Atlantis - The Lost Island.........

Blog banner

Predictive Analytics: How Data Science Predicts Trends(Weather ,Stock Market,Sales Forecasting ).

Blog banner

Decoding the Weave — How to Identify Original Patola Art on a Fabric

Blog banner

Scheduling

Blog banner

How to use GIT & GITHUB

Blog banner

PERT Overview

Blog banner

Cache memory

Blog banner

TRELLO

Blog banner

VIRTUAL MACHINES

Blog banner

Fun Christmas Activities For Toddlers & Kids

Blog banner

Beautiful and stunning natural phenomena worth to see

Blog banner

Security issues

Blog banner

Deadlock in Operating systems

Blog banner

The Role of Teachers in Building a Child’s Confidence

Blog banner

EdTech (Education Technology)

Blog banner

What your Favorite colour says about You?

Blog banner

Social Media.

Blog banner

The role of artificial intelligence in automating digital forensic analysis.

Blog banner

12 Principles of Animation

Blog banner

Distributed Denial of Service (DDoS) attack

Blog banner

Principles of Service Operation

Blog banner

Which Smartphone Company Has the Largest Market Share in India?

Blog banner

TRIGGERS IN DATABASE

Blog banner

Digital Marketing - The new way to reach end consumer

Blog banner

My First Trek - Sondai, Karjat - Shoaib Malik

Blog banner

Memory management

Blog banner

TOGETHER WE CAN CONQUER #team

Blog banner

Next time you click on "Remind me later", think twice!

Blog banner

Service Transition Process in ITSM

Blog banner

MD5 Collisions and the impact on computer forensics

Blog banner

Disk Management

Blog banner

SECURITY RISKS OF REMOTE WORKING

Blog banner

The Features of Blockchain

Blog banner

SEIZING DIGITL EVIDENCE AT THE SCENE

Blog banner

Quality check in IT services

Blog banner