Mesin virtual: Perbedaan antara revisi

Konten dihapus Konten ditambahkan
Kim Nansa (bicara | kontrib)
Fitur saranan suntingan: 3 pranala ditambahkan.
 
(23 revisi perantara oleh 12 pengguna tidak ditampilkan)
Baris 3:
 
== Definisi ==
Mesin virtual pada mulanya didefinisikan oleh [[Persyaratan virtualisasi Popek dan Goldberg|Gerard J. Popek dan Robert P. Goldberg]] pada tahun [[1974]] sebagai ''sebuah duplikat yang efisien dan terisolasi dari suatu mesin asli''. Pada masa sekarang ini, mesin-mesin virtual dapat mensimulasikan [[perangkat keras]] walaupun tidak ada perangkat keras aslinya sama sekali.<ref name="Smith_Nair_05">{{cite journal
| last = Smith
| first = Daniel E.
Baris 25:
 
Mesin virtual terdiri dari dua kategori besar, dipisahkan menurut cara penggunaan dan tingkat keterhubungannya dengan mesin-mesin aslinya. Sebuah '''mesin virtual sistem''' adalah perangkat yang berupa [[platform sistem]] yang lengkap dan dapat menjalankan sebuah [[sistem operasi]] yang lengkap. Sebaliknya, '''mesin virtual proses''' didesain untuk menjalankan sebuah [[program komputer]] tertentu (tunggal), yang berarti mesin virtual ini mendukung [[Proses (komputer)|proses]] tertentu juga. Karakteristik mendasar dari sebuah mesin virtual adalah batasan-batasan bagi perangkat lunak yang berjalan di dalam mesin tersebut, sumber daya yang dibatasi, dan tidak dapat mengakses ke luar tembok batasan dunia maya itu.
 
=== Mesin maya sistem ===
 
=== Virtual Machine Monitor ===
Virtual machine [[Monitor komputer|monitor]] (VMM) atau hypervisor merupakan bagian dari perangkat lunak yang membuat/mensimulasikan virtual machine. Hypervisor merupakan istilah industri untuk menjelaskan tentang VMM. Abstraksi mesin yang dibuat oleh VMM disebut virtual machine (VM).
 
VMM membuat platform virtual sehingga sistem operasi dapat berjalan di atasnya. VMM juga berperan sebagai manajer untuk menjalankan sistem operasi yang berjalan di atasnya. VMM merupakan teknik yang berguna dalam menambah fungsionalitas dibawah layer OS dan layer aplikasi. Sebagai manajer VM, VMM turut mengatur eksekusi yang berjalan di sistem operasi yang disimulasikannya. Abstraksi VMM disebut dengan virtual machine (VM). Perangkat keras yang di simulasikan dapat di atur sehingga mempunyai spesifikasi yang identik dengan perangkat keras dimana VMM diimplementasikan.VMM juga dapat meng-enkapsulasi suatu aplikasi yang berjalan di atasnya sehingga memudahkan manajemen dan kontrol terhadap sistem komputer.
 
Dengan adanya VMM maka Virtual machine yang diimplementasikan pada sistem komputer dapat membuat abstraksi dari layer yang ada di bawahnya sehingga dapat membuat/mensimulasikan layer aplikasi dari suatu sistem komputer yang di inginkan.
 
=== Jenis-jenis virtual machine ===
 
Terdapat beberapa pendekatan dalam mengklarifikasi virtual machine, dan salah satunya adalah mendefinisikannya menjadi 2 type (Type I dan type II). Klarifikasi ini didasarkan oleh fakta bahwa kedua type virtual machine ini bekerja dengan lower level platform yang mirip. Type I VMM tidak menggunakan host operating system, sedangkan type II VMM menggunakan host operating system. Type II disebut juga dengan paravirtual machine. Karena type II VMM menggunakan host operating sytem maka kinerjanya lebih buruk dibandingkan type I VMM.
<!--
===System virtual machines===
Baris 57 ⟶ 55:
 
Alternative techniques such as [[Solaris Zones]] provides a level of isolation within a ''single'' operating system. This is not as complete isolation as a VM, as kernel exploits in a single zone affect all zones, whereas kernel exploits in a VM do not affect other VMs on the host. Zones are not virtual machines, but an example of "operating-system virtualization". This includes other "virtual environments" (also called "virtual servers") such as [[Virtuozzo]], [[FreeBSD Jail]]s, [[Linux-VServer]], [[chroot jail]] and [[OpenVZ]]. These provide some form of encapsulation of processes within an operating system. These technologies have the advantage of being more resource-efficient than full virtualization; the disadvantage is that they can only run a single operating system and a single version/patchlevel of that operating system - so, for example, they cannot be used to run two applications, one of which only supports a newer OS version and the other only supporting an older OS version on the same hardware. solicited keep metal alive
-->
 
=== Mesin maya proses ===
<!--
===Process virtual machine===
{{see also|Virtualization|Comparison of Application Virtual Machines}}
 
A process VM, sometimes called an '''application virtual machine''', runs as a normal application inside an OS and supports a single process. It is created when that process is started and destroyed when it exits. Its purpose is to provide a [[system platform|platform]]-independent programming environment that abstracts away details of the underlying hardware or operating system, and allows a program to execute in the same way on any platform.
 
A process VM provides a high-level abstraction (compared to the low-level ISA abstraction of the system VM) — that of a [[high-level programming language]]. Process VMs are implemented using an [[Interpreter (computing)|interpreter]]; performance comparable to compiled programming languages is achieved by the use of [[just-in-time compilation]].
 
This type of VM has become popular with the [[Java (programming language)|Java programming language]], which is implemented using the [[Java virtual machine]]. Another example is the [[.NET Framework]], which runs on a VM called the [[Common Language Runtime]].
 
A special case of process VMs are systems that abstract over the communication mechanisms of a (potentially heterogeneous) [[computer cluster]]. Such a VM does not consist of a single process, but one process per physical machine in the cluster. They are designed to ease the task of programming parallel applications by letting the programmer focus on algorithms rather than the communication mechanisms provided by the interconnect and the OS. They do not hide the fact that communication takes place, and as such do not attempt to present the cluster as a single parallel machine.
 
Unlike other process VMs, these systems do not provide a specific programming language, but are embedded in an existing language; typically such a system provides bindings for several languages (e.g. [[C programming language|C]] and [[FORTRAN]]). Examples are PVM ([[Parallel Virtual Machine]]) and MPI ([[Message Passing Interface]]). They are not strictly virtual machines, as the applications running on top still have access to all OS services, and are therefore not confined to the system model provided by the "VM".
-->
 
== Teknik ==
=== Emulasi perangkat keras dasar ===
<!--
===Emulation of the underlying raw hardware (native execution) ===
 
This approach is described as [[full virtualization]] of the hardware, and can be implemented using a Type 1 or Type 2 [[hypervisor]]. (A Type 1 hypervisor runs directly on the hardware; a Type 2 hypervisor runs on another operating system, such as [[Linux]]). Each virtual machine can run any operating system supported by the underlying hardware. Users can thus run two or more different "guest" operating systems simultaneously, in separate "private" virtual computers.
 
The pioneer system using this concept was IBM's [[IBM CP-40|CP-40]], the first (1967) version of IBM's [[CP/CMS]] (1967-1972) and the precursor to IBM's [[VM (operating system)|VM family]] (1972-present). With the VM architecture, most users run a relatively simple [[interactive computing]] single-user operating system, [[Conversational Monitor System|CMS]], as a "guest" on top of the VM control program ([[VM-CP]]). This approach kept the CMS design simple, as if it were running alone; the control program quietly provides multitasking and resource management services "behind the scenes". In addition to CMS, VM users can run any of the other IBM operating systems, such as [[MVS]] or [[z/OS]]. [[z/VM]] is the current version of VM, and is used to support hundreds or thousands of virtual machines on a given mainframe. Some installations use [[Linux for zSeries]] to run [[Web server]]s, where [[Linux]] runs as the operating system within many virtual machines.
 
Full virtualization is particularly helpful in operating system development, when experimental new code can be run at the same time as older, more stable, versions, each in a separate virtual machine. The process can even be [[Recursion#Recursion in computing|recursive]]: [[IBM]] debugged new versions of its virtual machine operating system, [[VM (operating system)|VM]], in a virtual machine running under an older version of VM, and even used this technique to simulate new hardware.<ref>See [[History of CP/CMS]] for IBM's use of virtual machines for operating system development and simulation of new hardware</ref>
 
The standard [[x86]] [[processor architecture]] as used in modern PCs does not actually meet the [[Popek and Goldberg virtualization requirements]]. Notably, there is no execution mode where all sensitive machine instructions always trap, which would allow per-instruction virtualization.
 
Despite these limitations, several software packages have managed to provide [[x86 virtualization|virtualization on the x86 architecture]], even though [[dynamic recompilation]] of privileged code, as first implemented by [[VMware]], incurs some performance overhead as compared to a VM running on a natively virtualizable architecture such as the IBM System/370 or [[Motorola 68020|Motorola MC68020]]. By now, several other software packages such as [[Virtual PC]], [[VirtualBox]], [[Parallels Workstation]] and [[Virtual Iron]] manage to implement virtualization on x86 hardware.
 
[[Intel]] and [[AMD]] have introduced features to their x86 processors to enable virtualization in hardware.
-->
=== Emulasi sistem ===
<!--
===Emulation of a non-native system===
Virtual machines can also perform the role of an [[emulator]], allowing software applications and [[operating systems]] written for another [[computer processor]] architecture to be run.
 
Some virtual machines emulate hardware that only exists as a detailed specification. For example:
 
* One of the first was the [[p-code machine]] specification, which allowed programmers to write [[Pascal programming language|Pascal]] [[Computer program|programs]] that would run on any computer running virtual machine software that correctly implemented the specification.
* The specification of the [[Java virtual machine]].
* The [[Common Language Infrastructure]] virtual machine at the heart of the [[.NET Framework|Microsoft .NET]] initiative.
* [[Open Firmware]] allows plug-in hardware to include boot-time diagnostics, configuration code, and device drivers that will run on any kind of CPU.
 
This technique allows diverse computers to run any software written to that specification; only the virtual machine software itself must be written separately for each type of computer on which it runs.
-->
=== Virtualisasi di tingkat sistem operasi ===
 
Baris 112 ⟶ 64:
Terdapat tiga bottleneck penyebab virtualization overhead. Pertama, struktur yang memisahkan dua host procesess yang menyebabkan inordinate number dari context switches di host. Kedua, perubahan antara guest kernel dan guest user yang menghasilkan banyaknya operasi untuk melindungi memory (memory protection operation). Ketiga, perubahan antara dua guest application process (atau lebih dari dua) yang menghasilkan banyaknya operasi memory mapping.
 
Proses inisiasi VM yang telah dijalankan oleh VMM mempunyai functional process untuk melakukan hal-hal tersebut. VMMM functional process berada di host kernel. Methode untuk melakukan intercept key events (system call and [[signals]]) di eksekusidieksekusi di host kernel. Hal ini menyebabkan VMM kernel module mempunyai control yang baik terhadap guest machine process. Sebagai contoh kelebihannya, modul kernel VMM dapat mengubah address guest machine process secara langsung.
 
Guest machine process berubah secara periodik antara guest user mode dengan guest kernel mode. Guest kernel harus dilibatkan untuk melakukan system call dan exception yang dilakukan oleh guest application process dan mengolah data yang dikirim oleh virtual I/O device. Setiap kali guest machine memproses perpindahan dari guest kernel mode ke guest user mode maka address space guest kernel [0x7000000, 0xc0000000] harus dilindungi dari akses yang tidak diinginkan. Sebaliknya, setiap kali perpindahan antara guest machine memproses perpindahan antara user mode ke guest kernel maka address space harus disediakan. Guest machine process dapat melakukan address space manipulation karena membuat host system calls mmap, munmap dan mprotect.
 
Perpindahan address space antara guest application process Dilakukandilakukan di dalam proses virtualisasi. PerpidahanPerpindahan address space milik guest harus mengubah mapping antara guest virtual pages dan page di memory file physical tempat mesin melakukan virtualisasi. Perubahan mapping dilakukan dengan memanggil munmap untuk mengirim address space milik guest application process. Kemudian mmap dipanggil setiap residen di virtual page untuk menerima guess application process.
 
<!--
Baris 142 ⟶ 94:
* Sistem [[Honeywell]] Multics
* Sistem Liberator [[Honeywell]] 200/2000 menggantikan sistem IBM 14xx, Level 62/64/66 GCOS
* [[IBM]] System/360 Model 145, perangkat keras [[emulator]] untuk sstem Honeywell 200/2000
* [[RCA]] Spectra/70 Series mengemulasikan IBM System/360
* CPU [[NAS]] mengemulasikan mesin-mesin IBM and Amdahl
Baris 148 ⟶ 100:
* CPU [[Xerox]] Sigma 6 yang dimodifikasi untuk mengemulasikan sistem GE/Honeywell 600/6000
 
== Daftar perangkat lunak mesin maya ==
<!--
{{col-begin}}
{{col-2}}
;Perangkat lunak mesin maya proses (aplikasi)
* [[Common Language Runtime]] - [[C Sharp (bahasa pemrograman)|C#]], [[Visual Basic .NET]], [[J Sharp|J#]], [[Managed Extensions for C++|Managed C++]]
* [[EiffelStudio]] untuk [[Eiffel (bahasa pemrograman)|bahasa pemrograman Eiffel]]
* [[Ejscript]] - Bahasa Javascript dan VM
* [[Erlang (bahasa pemrograman)]]
* [[Forth virtual machine]] - [[Forth (bahasa pemrograman)|Forth]]
* [[Glulx]] - [[Glulx]], [[Z-machine|Z-code]]
* Hec - [[Bytecode|Hasm Assembler]]
* [[Inferno (sistem operasi)|Inferno]] - [[Limbo (bahasa pemrograman)|Limbo]]
* [[Java virtual machine]] - [[Java]], [[Nice (bahasa pemrograman)|Nice]], [[REXX|NetREXX]]
* [[LLVM|Low Level Virtual Machine (LLVM)]] - sekarang [[C (bahasa pemrograman)|C]], [[C++]], Stacker
* [[Lua (bahasa pemrograman)|Lua]]
* [[Macromedia Flash Player]] - [[SWF]]
* [[MMIX]] - [[MMIX]]AL
* Neko virtual machine - sekarang Neko dan [[haXe]]
* [[O-code machine]] - [[BCPL]]
* [[p-code machine]] - [[Pascal (bahasa pemrograman)|Pascal]]
* [[Parrot virtual machine|Parrot]] - [[Perl 6]]
* [[Perl|Mesin virtual Perl]] - [[Perl]]
* [[Portable.NET]] - [[C Sharp (bahasa pemrograman)|C#]], [[Visual Basic .NET]], [[J Sharp|J#]], [[Managed Extensions for C++|Managed C++]]
* [[YARV]] - [[Ruby MRI]]
* [[Rubinius]] - [[Ruby (bahasa pemrograman)|Ruby]]
* [[ScummVM]] - [[Scumm]]
* [[SECD machine]] - [[ISWIM]], [[Lispkit Lisp]]
* [[Sed]] the stream-editor can also be seen as a VM with 2 storage spaces.
* [[Smalltalk|Smalltalk virtual machine]] - [[Smalltalk]]
* [[SQLite|SQLite virtual machine]] - [[SQLite|SQLite opcodes]]
* [[Squeak|Squeak virtual machine]] - [[Squeak]]
* [[SWEET16]]
* [[Tamarin (JavaScript engine)]] - ActionScript VM in Flash 9
* [[TrueType|TrueType virtual machine]] - [[TrueType]]
* [[Valgrind]] - checking of memory accesses and leaks in [[x86]]/[[x86-64]] code under [[Linux]]
* [[Virtual Processor]] (VP) from [[Tao Group]] ([[United Kingdom|UK]]).
* [[VX32|VX32 virtual machine]] - application-level virtualization for native code
* Waba - Virtual machine for small devices, similar to Java
* [[Warren Abstract Machine]] - [[Prolog]], [[CSC]] [[GraphTalk]]
* [[Z-machine]] - [[Z-machine|Z-Code]]
* [[Zend Engine]] - [[PHP]]
{{col-2}}
;System (Hardware) virtual machine software{{Clarifyme|date=October 2007}}
* [[ATLAS Transformation Language|ATL]] (A [[Model Transformation Language|MTL]] Virtual Machine)
* [[Bochs]], portable open source x86 and AMD64 PCs emulator
* [[CoLinux]] Open Source Linux inside Windows
* [[Denali (operating system)|Denali]], uses paravirtualization of x86 for running para-virtualized PC operating systems.
* [[FAUmachine]]
* [[Hercules emulator]], free System/370, ESA/390, z/Mainframe
* [[Padded Cell for x86| Integrity Workstation]] Green Hills Software[http://www.ghs.com/products/rtos/integrity_pc.html]
* [[Kernel-based Virtual Machine|KVM]]
* [http://lilyvm.sourceforge.net LilyVM is a lightweight virtual machine][http://www.infosecwriters.com/hhworld/hh8/vmsim.htm An introduction]
* [[Microsoft Virtual PC]] and [[Microsoft Virtual Server]]
* [http://okl4.org OKL4] from [http://www.ok-labs.com Open Kernel Labs]
* OVPsim [http://ovpworld2.com]
* [[Parallels Workstation]], provides virtualization of x86 for running unmodified PC operating systems
* [[Parallels Desktop for Mac]], provides virtualization of x86 for running virtual machines on Mac OS X or higher
* [[QEMU]], is a simulator based on a virtual machine.
* [[SheepShaver]].
* [[Simics]]
* [[SVISTA]]
* [http://www.trango-vp.com Trango Virtual Processors]
* [[twoOStwo]]
* [[User-mode Linux]]
* [[VirtualBox]]
* [[Virtual Iron]] (Virtual Iron 3.1)
* [[Virtual Operating System]] from [[Star Virtual Machines]]
* [[VM (Operating system)|VM]] from [[International Business Machines|IBM]]
* [[VMware]] (ESX Server, Fusion, Virtual Server, Workstation, Player and ACE)
* [http://www.scalemp.com/products vSMP Foundation] (From [http://www.scalemp.com ScaleMP])
* [[vThere]] (From Sentillion, Inc. [http://www.sentillion.com/solutions/remote-access.html])
* [[Xen]]
* IBM POWER SYSTEMS
 
; OS-level virtualization software
* [[OpenVZ]]
* [[Virtuozzo | Parallels Virtuozzo Containers]]
* [[FreeVPS]]
* [[Linux-VServer]]
* [[FreeBSD Jail]]s
* [[Solaris Containers]]
* [[AIX]] Workload Partitions
{{col-end}}
-->
=== Deskripsi tingkat lanjut mengenai beberapa perangkat lunak virtualisasi ===
<!--
The following software products are able to virtualize the hardware so that several operating systems can share it.
 
*[[Adeos]] is a [[Hardware Abstraction Layer]] that can be loaded as a [[Module (Linux)|Kernel Module]] in [[Linux]]. It allows the loading of a real-time kernel as a module, at the same time as Linux but with higher priority.
*[[Denali (operating system)|Denali]] uses [[paravirtualisation]] to provide high-performance virtual machines on x86 computers. Denali's virtual machines support specialised minimal OSs for Internet services. The system can scale to thousands of virtual machines. Denali does not preserve the application binary interface (ABI), and so applications must be recompiled to run within a library operating system; in this sense it is similar to the [[Exokernel]].
*[http://ok-labs.com OKL4] uses the open-source [[L4 microkernel]] as a hypervisor to provide a high-performance virtualization solution for embedded systems.
*[[OpenVZ]] - Operating System-level server virtualization solution, built on Linux.
*[[Parallels, Inc.|Parallels]] provides virtualization of x86 for running unmodified PC operating systems. It also uses a lightweight hypervisor technology in order to improve security and to increase the efficiency. Parallels has become popular for its ability to run Windows as a guest under [[Mac OS X]] on the [[Apple-Intel architecture]].
*[[QEMU]] is a simulator based on a virtual machine, which gives it the ability to emulate a variety of guest CPU architectures on many different host platforms.
* [[Virtual Iron]] provides virtual machines for x86 that run unmodified operating systems, such as Windows, Red Hat and SUSE. Virtual Iron open source virtualization technology implements [[native virtualization]], which delivers near-native performance for x86 operating systems.
*[[Virtuozzo]] replaces the hardware abstraction layer with a modified version enabling it to run with better performance of the OS, but forces all the VMs on a hardware box to all run the same OS, with some flexibility to support various Linux distributions on the same server. Currently they have a version for Windows 2003 and for Linux. [[OpenVZ]] is a related open-source project providing similar functionality for Linux.
* [http://www.scalemp.com/products vSMP Foundation] from [http://www.scalemp.com ScaleMP] aggregation platform enables the creation of high-end x86-based symmetric multiprocessor (SMP) systems, by running single VM acrooss multiple industry-standard x86 systems.
*[[VMware]] provides virtual machines for x86 that can run unmodified PC operating systems. The technology involved in doing this is complex and also incurs (sometimes significant) performance overheads with hosted VMware products (VM Server and Workstation). ESX server provides near-native performance and a fully virtualized option (along with para-virtualization of some hardware components). Xen trades running of existing operating systems for running modified (paravirtualized) operating systems with improved performance. Virtual Iron provides full OS compatibility for existing or new OSes with near-native performance without the performance trade-offs between paravirualization and binary translation.
*[[Xen]] Virtualization system whose motivation differs from that of Denali in that it is intended to run a moderate number of full-featured operating systems, rather than a large number of specialised, lightweight ones.
*[[Kernel-based Virtual Machine|KVM]] is a [[Linux kernel]] module that enables a modified QEMU program to use hardware virtualization.
-->
== Buku-buku ==
* Jim, Jr. Smith, Ravi Nair, James E. Smith, Heath Potter, Virtual Machines: Versatile Platforms For Systems And Processes, Publisher Morgan Kaufmann Publishers, May 2005, ISBN 1-55860-910-5, 656 pages
* Dostál, J. [http://mict.upol.cz/vyuziti_virtualniho_pocitace_ve_vzdelavani.pdf Virtual Machines in education (Vyuzití virtuálního pocítace ve vzdelávání).]{{Pranala mati|date=Mei 2021 |bot=InternetArchiveBot |fix-attempted=yes }} Olomouc, EU: Votobia, 2008. 66 s. ISBN 978-80-7220-309-3.
* Craig, Iain D. Virtual Machines. Springer, 2006, ISBN 1-85233-969-1
 
Baris 274 ⟶ 124:
 
== Pranala luar ==
* {{en}} [http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=168 ''The Reincarnation of Virtual Machines, Article on ACM Queue by Mendel Rosenblum, Co-Founder, VMware''] {{Webarchive|url=https://web.archive.org/web/20040815054433/http://acmqueue.com/modules.php?name=Content&pa=showpage&pid=168 |date=2004-08-15 }}
* {{en}} [http://www.lri.fr/~quetier/papiers/EXPGRID.pdf ''Performances comparison between Xen, UML, Vserver and VMware''] {{Webarchive|url=https://web.archive.org/web/20071128133801/http://www.lri.fr/~quetier/papiers/EXPGRID.pdf |date=2007-11-28 }}
 
[[Kategori:Mesin virtual| ]]