PostWhat is a Virtual Machine?

Posts 1–10 of 10 · Page 1 of 1
What is a Virtual Machine?
I have recently started trying to learn Visual Basic and I came across the .NET Framework (I've heard it lots of times before though). The definitions I have found state that a framework is like a skeleton on which programs are run on (which still confuses me), and that a framework is something like a Virtual Machine, independent on the OS.

I feel like I should be able to grasp what a framework is before I move on with my studies/trials, so I came here for some clarity.
Can someone explain like, what a Virtual Machine is, without requiring some special background knowledge?

Thanks in advance.
A virtual machine is basically an operating system that's installed on a program within your main operating system.

Your Main OS(Windows/Mac/Linux) --> VirtualVM --> Another OS
Quote Originally Posted by KryptonS View Post
A virtual machine is basically an operating system that's installed on a program within your main operating system.

Your Main OS(Windows/Mac/Linux) --> VirtualVM --> Another OS

So, for example, there's a VM that can run Mac programs on Windows? Is it like that?
Quote Originally Posted by MasterTrainer View Post
So, for example, there's a VM that can run Mac programs on Windows? Is it like that?
Not Mac programs but the Mac Operating System itself (OSX Lion)
Without .NET Framework, some of your program's features if not all might not function at all.
It's the Operating system of your program.
For example, you have an .apk file. If you try to run it on Windows, will it start and function? Absolutely not.
You need Android Operating system to open the .apk file.
Its basically a program that runs operating systems on your main OS

Example: Your OS -> Virtual machine -> Another OS (Mac,Windows,Linux)
None of these answers are correct.
In terms of programming and .net specifically, a virtual machine, in short runs and manages your code.
The .NET virtual machine is called the CLR, Common Language Runtime. Like many other VMs including the closely rated JVM (Java Virtual Machine), it JIT compiles your .NET program which is just high level IL to actual native code. It also manages your memory and most of your resources for you in a process called garbage collection. This is why you don't hVe to worry about allocating and freeing memory in .net languages. On top of all that it provides a foriegn function interface to allow your program to interface with c and c++ code. Most things done in .net languages are backed by c code that do the actual process like interacting with the os and its resources. The exe file that represents your program is merely a CLR bootstrapper (starter) that feeds your program, which is IL stored in the data region, to the CLR.
With out the CLR your code and program are literally useless because nothing is there to run it.
Quote Originally Posted by krazyshank View Post
None of these answers are correct.
In terms of programming and .net specifically, a virtual machine, in short runs and manages your code.
The .NET virtual machine is called the CLR, Common Language Runtime. Like many other VMs including the closely rated JVM (Java Virtual Machine), it JIT compiles your .NET program which is just high level IL to actual native code. It also manages your memory and most of your resources for you in a process called garbage collection. This is why you don't hVe to worry about allocating and freeing memory in .net languages. On top of all that it provides a foriegn function interface to allow your program to interface with c and c++ code. Most things done in .net languages are backed by c code that do the actual process like interacting with the os and its resources. The exe file that represents your program is merely a CLR bootstrapper (starter) that feeds your program, which is IL stored in the data region, to the CLR.
With out the CLR your code and program are literally useless because nothing is there to run it.
Just FYI, "C and C++ code" isn't true either. You can call native APIs from basically any language that supports imports which isn't native to C or C++ only.
Quote Originally Posted by Hitokiri~ View Post


Just FYI, "C and C++ code" isn't true either. You can call native APIs from basically any language that supports imports which isn't native to C or C++ only.
That doesn't make it wrong. c and c++ code are the main things you'll be calling from .Net. Stop trying to be a smartass.
Quote Originally Posted by krazyshank View Post
That doesn't make it wrong. c and c++ code are the main things you'll be calling from .Net. Stop trying to be a smartass.
Guess you're one of those assholes who always has to be right and doesn't like to hear any objections.
I was simply pointing out you can use other languages.
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us