What is virtual Machine Manager

Source: Internet
Author: User
Tags execution thread win32
Virtual Machine Manager (VMM) is a practical operating system for Windows 95, which establishes and maintains a framework for managing virtual machines while providing many important services for other VXD programs. Three of these important services are:
Memory management
Interrupt processing
Thread scheduling
Memory management
VMM creates a 32-bit virtual address space for the system virtual machine using the memory paging capability of the Intel 80386 or newer processor. It divides this address space into four different parts:
The V86 zone addresses from 0H to 10FFEFH, which belong to the currently executing virtual machine.
The application private area address is from 4MB to 2GB. This is the space for the WIN32 application to run. Each WIN32 process has its own 2GB (minus 4MB).
The application share address is from 2GB to 3GB. This area is shared by all applications within the virtual machine. The system DLL (USER32,KERNEL32,GID32) is in existence here. All Win16 programs are also placed here because they behave in a nonstandard, read-write to other WIN16 programs in memory. Only in this area can the WIN16 program see all the other Win16 programs. Memory-mapped files and memory allocated to DPMI are also stored here.
The system share address is from 3GB to 4GB. This is where VMM and VXM are stored.
VMM provides three kinds of VXD services for VXD programs:
Page Memory Service This service allocates/manages memory with a page size of 4KB. This is the lowest level of service available, and all other services are built on the page memory service.
Heap Memory service manages small chunks of memory. This high level of memory management Service is based on the page memory service.
Table service manages a fixed sized block of memory that can be used to implement a linked table.
Handling interrupts
In protected mode, interrupts point to interrupt description table (IDT). VMM monitors the IDT of virtual machines through the help of VxD. Usually VMM handles almost all of the interrupt entrances within the IDT. It carries out the first level of interrupt processing: Save the state of the interrupted program, transfer control to the second level of interrupt processing, the second level of interrupt processing is usually carried out by a variety of VXD procedures for the actual processing. When the second-level interrupt handler completes its work, it transfers control to the reassignment program, which resumes the state of the interrupted program and continues from where it was previously interrupted.
The description above is too simple. Because the time slice of the interrupted virtual machine may have passed, the reassignment may not be performed immediately. The VXD program installs interrupt handling through VMM services such as: Set_pm_int or Hook_v86_int_chain. The VXD program should not directly alter the interrupt entry in the IDT (unless you know exactly what will happen).
Thread scheduling
VMM uses two scheduler components to implement prioritized multithreading between virtual machines:
Master Scheduler
Time slice Manager or Deputy Scheduler
The task of the primary scheduler is to select a thread with the highest priority to execute. This choice occurs when VMM processes an interrupt, such as a timer interruption. The result of the selection determines which thread/virtual machine gets control when VMM returns from the interrupt service. The result of the main scheduler's work is OK, one thread either gets control or none, and only one thread can get control. VMM and other VxD can adjust the thread's execution priority through the VMM service. For example, when a hard interrupt occurs, VMM increases the execution priority of the interrupt processing so that it has a higher chance of being invoked in the shortest possible time.
The secondary scheduler allocates CPU time to the highest priority thread through the services provided by the primary scheduler. The secondary scheduler gives each thread a time slice. When a thread completes its time slice, the secondary scheduler increases the priority of the next thread so that it is selected and executed by the main scheduler.
You can get details about this issue from Walter Oney ' s Systems programming for Windows 95 and Windows DDK documentation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.