linux virtualization Profile

Cross-platform born

  In the early development of computer interfaces, all types of computing platforms, computing devices provided by the invocation complicated, not like today relatively uniform standard. The need to adapt different platforms, need to write code that is compatible with a lot of red tape, which virtually for developers to bring a lot of inconvenience. Even this confusion appeared on the IBM under which a company different models of machines, IBM engineers have created a virtualization technology to help the program to quickly adapt the physical machine on different platforms.

  We know the program calls for computer resources depends on the operating system interfaces given. Our program through the interface provided by the operating system, sending commands to the physical hardware.

  Methods Therefore, to achieve cross-platform compatible program is actually very simple, consistent interface calls as long as the way the operating system or physical hardware provided, the program does not require an interface compatible with different hardware platforms, but only an interface developed for this set of uniform It can be. Virtualization technology is through its different hardware platforms themselves fit, and be abstracted into a unified interface to achieve cross-platform program for this purpose.

  Today, the reason why we focus on and use of virtualization technology, cross-platform applications is still a large part of the reason.

 

Virtualization definition

  Virtualization technology is a computer abstract physical resources, convert to virtual computer resources available to technology used by the program. Computer resources referred to herein, including the operation of control resources provided by the CPU, data storage resources provided by the hard disk, the network transmission resources provided by the network card and the like.

 

The virtualization for resource management

  In the development of virtualization technology, people gradually discovered another great use of virtualization, which is used in the management of computer resources.

  The virtual resource management is not difficult to understand, because the virtualization technology itself is an abstract physical resources of the computer and then processed into virtual resources to provide unified call interface, it is clear that when we virtualized hardware resources in which it is easy to do some ' hands and feet ', to tell some false application resource data. For example, we just tell the computer program is only 4GB of memory, then regardless of the real physical machine is 8GB, 16GB or 32GB, 4GB application will follow this false values ​​to handle its logic.

  To manage computer resources through virtualization technology in a way which allows us to control computer resources become more flexible, but also a substantial increase in the utilization of computer resources. Note that there is an increased usage rather than efficiency of resources.

  In fact, virtualization for resource management, there are many advantages, such as nginx and we want to run tomcat on the same machine, it is clear that these two applications need to listen on port 80, if you do not use virtualization, it is clear that a physical machine can not simultaneously provide two 80 ports. Another example of multiple applications running on the same machine need to use different versions of the same tool library, the program itself limit the number of processes such as open simultaneously, these are the resources of the physical machine can not simultaneously provide. However, virtualization technology resource isolation by the way, invisible to the isolation of these programs in different virtual environments, since different virtual environments, running in different natural environments of the program will not interfere with each other or compete for the resources.

 

Virtualization Category

  From the perspective of virtualization implementation can be roughly divided into virtualization and hardware virtualization software virtualization, from an architectural point of view they can be divided into bare metal virtualization architecture and dwelling architecture, classification of a variety of ways, in this article we introduce hardware virtualization, virtualization software, a bare metal virtualization architecture and dwelling infrastructure virtualization.

  Hardware virtualization refers to the physical hardware itself provides virtualization support Take, for example, a platform of CPU instructions can be converted into another platform and execute instructions for your platform and applications to run in a completely feeling on that platform; Again, CPU can simulate fission itself, let the program or operating system thinks there are multiple CPU, and then be able to run multiple programs simultaneously, or operating system.

  Software virtualization software suggests that it is by way of virtual hardware resources into virtual resources, its essence is to implement the directive by the application layer sandwiched between layers of software and hardware platform conversion. Still use the CPU for example, in software virtualization implementation, the conversion instruction by a layer of inclusions on the application and hardware platform virtualization software achieved. In other words, although the application instructions issued to the operating system or physical hardware is not supported by the current hardware platform command, this virtualization software will also convert the current hardware platform that can be identified.

 

virtual machine

  In a virtualized implementation, we must mention is the virtual machine, the virtual machine is called by between applications and the operating system (alien architecture) or operating system between the hardware resources (bare metal architecture) and adds a layer instructions for converting a virtual machine monitor in order to achieve virtualization, we usually called virtual machine monitor for the Hypervisor.

  From our habit to build a virtual operating system environments VMware Workstation, Xen software, the Java Virtual Machine JVM, PHP virtual machine HHVM and so on, virtual machines are active in the process of developing our program to a running program. We will be very surprised to find that the original core of the specific language runtime JVM, HHVM, etc., but also a real virtualization implementation. Yes, as long as we carefully analyze and think about what you will find that virtualization it is based on the idea to achieve. They isolation through programs and operating systems to convert the program's instructions for the operating system platform where the current instruction can be executed to achieve the purpose of the program without any modification to perform. It is also for this reason, these language programs have a very strong cross-platform.

  Virtual machine appears to achieve virtualization, applications can be run cross-platform, the virtual machine has any weaknesses?

  It is clear that the virtual machine when running applications need to go through a virtual machine monitor process to execute, which will undoubtedly bring efficiency, the solution to this problem, real virtual machine program often do not completely follow the design structure Hypervisor, but the introduction of other technologies to solve the efficiency problem.

  For example, VMware Workstation, Xen, we can see the use of hardware-assisted virtualization by allowing direct command of hardware virtualization support, in order to avoid the inefficient Hypervisor. And if JRE, HPHP, in addition to explain the implementation mechanism Hypervisor-based implementation, there are in-time compiler (Just In Time) operating mechanism, so that the program code is compiled into machine code before running in line with the current hardware platform, this approach has been It does not belong to the category of virtualization.

 

About container

  Container is what we really want to learn, virtualization is a basic, on the container, I will focus on in a future article.

Guess you like

Origin www.cnblogs.com/limaomao/p/11582045.html