4 ms·
To be That Guy: this is an emulator, not a VM. While the term can apply in a descriptive sense, and in the pre-hardware-virtualization past there was some ambi
by ajross 2y ago
To be That Guy: this is an emulator, not a VM. While the term can apply in a descriptive sense, and in the pre-hardware-virtualization past there was some ambiguity, the overwhelmingly common usage of "Virtual Machine" in the modern world refers to an environment making use of hardware virtualization features like VT-x et. al.
- kragen 2y agoI don't think that terminology is "overwhelmingly common", and I'd argue that it isn't even entirely correct. The JVM is widely deployed, the Ethereum VM is called the "EVM", https://www.linuxfoundation.org/hubfs/LF%20Research/The_State_of_eBPF_010824.pdf?hsLang=en https://www.linuxfoundation.org/hubfs/LF%20Research/The_Stat... describes BPF and eBPF repeatedly as "virtual machines", https://webassembly.org/ https://webassembly.org/ begins by saying, "WebAssembly (abbreviated Wasm) is a binary instruction format for a stack-based virtual machine," etc. "Virtual machine" is still the most common term for fictional machines. (Myself, I think I'd prefer "fictive machine", "fictious machine", "imaginary computer", or "fantastic automaton", but I doubt these terms will gain adoption.) You can't always use the term "emulator" instead of "virtual machine", because while you could say wasmtime was an "emulator", you can't correctly say that WebAssembly itself is an "emulator". Rather, WebAssembly is the virtual machine which wasmtime emulates. It's also common to call emulators "virtual machines". (The Wasmtime web site mostly calls wasmtime a "runtime" and WebAssembly an "instruction format", FWIW.) And of course a running instance of an emulator is also a "virtual machine" in a different sense. I think it's also reasonable to use "virtual machine" in the way you are describing, and it has some overlap with this last sense of "virtual machine". Perhaps in your current environment that is the overwhelmingly most common usage, but that is definitely not true elsewhere.
- dataflow 2y agoDisagree with both of you. JVM was always a misnomer, it just stuck because that's just the name they stuck with. Putting "virtual machine" in its name in defiance of the meaning doesn't suddenly make it a virtual machine any more than calling your dog "my son" makes your dog your son. And virtual machines have used software virtialization for the longest time, they aren't always hardware based. Really, a virtual machine is literally what it says on the tin: something that isn't a physical computer (machine), but presents itself as one. You know, with a virtual CPU or a virtual disk or a virtual keyboard etc., whatever a computer would have. If it doesn't present itself as a machine, it's not a virtual machine. Calling JVM a virtual machine just because it interprets some bytecode the same way a machine does is like calling me a virtual doctor just because I read text the same way a doctor does.
- kragen 2y agoThe JVM is a VM in that sense. It isn't a physical computer, but presents itself as one. It's true that that computer doesn't have a disk or a keyboard, but neither do the vast majority of physical computers, including, specifically, the set-top boxes the JVM was originally designed to run on.
- dataflow 2y ago> The JVM is a VM in that sense. It isn't a physical computer, but presents itself as one. No, it isn't and doesn't. What in the world does it have that makes you think it pretends to be a computer? A bunch of pretend registers and a memory limit?
- kragen 2y agoIt doesn't have registers, pretend or otherwise, or a memory limit. It sounds like you aren't very familiar with the JVM or computers in general. On the JVM in particular, I suggest reading https://docs.oracle.com/javase/specs/jvms/se23/html/index.html https://docs.oracle.com/javase/specs/jvms/se23/html/index.ht....
- dataflow 2y agoWhat are you talking about? It literally has a program counter register, it's right there in you own link? https://docs.oracle.com/javase/specs/jvms/se23/html/jvms-2.html#jvms-2.5.1 https://docs.oracle.com/javase/specs/jvms/se23/html/jvms-2.h... I just mixed it up with Dalvik having multiple registers, but that makes it even worse. At least normal machines have more registers. And literally here: The following section provides general guidelines for tuning VM heap sizes: The heap sizes should be set to values such that the maximum amount of memory used by the VM does not exceed the amount of available physical RAM. https://docs.oracle.com/cd/E21764_01/web.1111/e13814/jvm_tuning.htm#PERFM150 https://docs.oracle.com/cd/E21764_01/web.1111/e13814/jvm_tun... Maybe instead of telling me I'm clueless, tell me how you're right? What do you see in it that is actually virtializing a computer in your mind? Because I'm pretty sure that if someone sold you a VM service and it turned out to be just them running your programs under the JVM, you'd be kind of mad.
- troad 2y ago> To be That Guy: this is an emulator, not a VM. While the term can apply in a descriptive sense, and in the pre-hardware-virtualization past there was some ambiguity, the overwhelmingly common usage of "Virtual Machine" in the modern world refers to an environment making use of hardware virtualization features like VT-x et. al. I don't think the distinction you're advocating for actually exists. 'Virtual machine' is commonly used for any software that executes machine- or bytecode, irrespective of the reason. This can include virtualisation, but you also commonly see the term used for language runtimes: e.g. Java's JVM, Ruby's YARV (Yet Another Ruby VM). The one area you don't actually hear the term that often is in emulation, and this is in part because most modern emulators have tended away from emulating entire systems, and towards techniques like dynamic recompilation (dynarec) of emulated software.
- asimpletune 2y agoExactly, emulation is “make sure the input and output of what you’re emulating are the same”, whereas simulation is “model the actual internal mechanisms of the thing you’re simulating, so as to achieve the same inputs and outputs”.
- deleted 2y ago[deleted]
- LeFantome 2y agoThis is a VM like in JVM ( Java Virtual Machine ). I think you will find Java qualifies for “overwhelmingly common usage”.
- ajross 2y agoNot in this context, no. If you tell your boss you're deploying the solution "in a VM" and it turns out to be a .jar file, you're likely to be fired. Context and convention are important. This subthread is filled with people who are technically right, but choosing to cheer for an unclear and idiosyncratic terminology. A VM means hardware virtualization. Choosing other meanings is at best confusing and at worst a terrible security bug.
- jazzypants 2y agoIs it not the exact same concept underneath? An environment that provides a layer of abstraction by translating instructions into a standardized, transportable form that can be executed consistently, regardless of the underlying hardware or operating system? I always thought that it made sense to use the word for both things, and I never even thought twice about it when people used it for programming languages. It would have to be a very strange conversation for someone to misunderstand someone else in the way you mentioned.
- ajross 2y ago> Is it not the exact same concept underneath? Sure, in precisely the same way that a kitchen knife and a sword are the "exact same concept underneath". But if you use the words interchangeably you'll confuse people. And I'll just repeat the point, if you tell your boss your web app is "running in a VM" when you just wrote it in Java, you'll be fired for some really terrible security analysis.
- bazoom42 2y agoThe use of Virtual Machine as in the article is old and well established in computer science. E.g in the LLVM (low-level virtual machine) compiler backend. What do you mean with “in this context”? The article is clearly using the term in the same sense as JVM and LLVM. (Also your relationship with you boss sounds pretty toxic. If there is ambiguity in the terminolgy why don’t you just ask a clarifying question? Many words can have multiple meanings.)
- asimpletune 2y agoI have to politely disagree. In the most pure sense a VM is a made up computer, without any implications being expressed to what it’s intended to be used for or how it works. In the article the author even states as one example emulation a classic console, but it’s clear from the article that there are many other possible VM’s from the definition they provide. Anyways the point is VM is abstract, and there are many many types of them. Simulators, emulators, hypervisors, etc… are all VMs, but also there are VMs that don’t quite already have a name for them yet because they’re strange. I don’t mean to be rude at all - quite the contrary, I want to be respectful - but I also want to be clear about these terms for people who are interested in learning.