Jump to content

Computer Within Computer Question


Unity+

Recommended Posts

So, the hypothetical here is let's say you have a physical computer that has the possibility of emulating the exact way that the physical computer works digitally. Considering that possibility, let's say that virtual computer can emulate another virtual machine.

 

The question is if you were only given the data about the schematics of the physical machine and it's sequences of states within the circuitry, would you be able to tell that there is a virtual computer within a computer?

Link to comment
Share on other sites

We do exactly this all the time when designing new processors. And when you run a virtual machine, such as VirtualBox. The main way you can tell that it is an emulated processor is because it is slow!

 

If you can see the sequence of states that the host computer is executing then you could, in principle, reverse engineer the code it is running and work out that it is running an emulator. (One clue might be that it is executing many more instructions than are in the program you give it to run.)

Link to comment
Share on other sites

We do exactly this all the time when designing new processors. And when you run a virtual machine, such as VirtualBox. The main way you can tell that it is an emulated processor is because it is slow!

 

If you can see the sequence of states that the host computer is executing then you could, in principle, reverse engineer the code it is running and work out that it is running an emulator. (One clue might be that it is executing many more instructions than are in the program you give it to run.)

I know we do it all the time, just a thought experiment.

 

 

 

(One clue might be that it is executing many more instructions than are in the program you give it to run.)

That isn't completely useful since there are other programs that could be executing way more functions.

Link to comment
Share on other sites

That isn't completely useful since there are other programs that could be executing way more functions.

 

True. You would have to try and separate out the threads of different things being run. It would not be easy!

But it is, in principle, always possible to find out what code a processor is executing.

Link to comment
Share on other sites

Do you want to emulate exactly the same CPU within the same CPU?

Like emulate Intel on Intel machine?

Or without such restrictions?

 

Because 15 years old x86 CPU (Duron 1300 MHz) was emulating mine Amiga at speed it never had, literally hundred time faster.

Amiga 500 has 7.14 MHz. 1300/7.14=182 times faster by frequency.

But old CPUs had much slower instructions, f.e. division was the slowest instruction on Motorola 680x0, 140-158 cycles per div, 70 cycles per multiply,

 

http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/timstandard.HTML

http://oldwww.nvg.ntnu.no/amiga/MC680x0_Sections/mc68000timing.HTML

 

Current CPUs have it much more optimized, or even do couple instructions in single CPU cycle.

Link to comment
Share on other sites

...

The question is if you were only given the data about the schematics of the physical machine and it's sequences of states within the circuitry, would you be able to tell that there is a virtual computer within a computer?

My first thought on reading the title was Conway's game-of-life. Since the game has the capacity of a universal Turing machine it seems to me it would be rather difficult to tell the difference between a game running as a virtual computer and a game running otherwise. :unsure:

Link to comment
Share on other sites

My first thought on reading the title was Conway's game-of-life. Since the game has the capacity of a universal Turing machine it seems to me it would be rather difficult to tell the difference between a game running as a virtual computer and a game running otherwise. :unsure:

That is the best way, as far as I know, to think of it.

Link to comment
Share on other sites

But your original questions implied you had access to the internal states of the "outer" (host) machine, in which case one could tell it was running an emulation of another machine.

 

If I have misunderstood, and you only have access to the states of the inner (emulated) machine then it is, of course, impossible to tell.

Link to comment
Share on other sites

But your original questions implied you had access to the internal states of the "outer" (host) machine, in which case one could tell it was running an emulation of another machine.

 

If I have misunderstood, and you only have access to the states of the inner (emulated) machine then it is, of course, impossible to tell.

Yes, that is what I mean.

 

In this case, would it be wrong to say that one could never determine whether any computer, given that data, was running an emulated version of itself?

Link to comment
Share on other sites

In this case, would it be wrong to say that one could never determine whether any computer, given that data, was running an emulated version of itself?

 

If you have access to the states of the machine, surely you can work out what program it is running. Either it is running an emulator or it is running something else (Life, accounting program, web browser, whatever). Maybe I am missing something, but I fail to see the problem. (Well, the problem is that it would be nearly impossible in practice, but ...)

 

Imagine someone gave you an assembly code listing of a program and asked you what it was. It would be extremely difficult but you could, in principle, work out what it did. That is the same problem. Except that first, you would have to piece together the assembly program by tracing the instructions executed.

Link to comment
Share on other sites

 

If you have access to the states of the machine, surely you can work out what program it is running. Either it is running an emulator or it is running something else (Life, accounting program, web browser, whatever). Maybe I am missing something, but I fail to see the problem. (Well, the problem is that it would be nearly impossible in practice, but ...)

 

Imagine someone gave you an assembly code listing of a program and asked you what it was. It would be extremely difficult but you could, in principle, work out what it did. That is the same problem. Except that first, you would have to piece together the assembly program by tracing the instructions executed.

But deciphering assembly code is different from obtaining the state of each transistor in the machine, I would think.

Link to comment
Share on other sites

But deciphering assembly code is different from obtaining the state of each transistor in the machine, I would think.

 

It is orders of magnitude simpler to decipher assembly code (even though it is almost impossible, in the general case) but I can't see that you are doing anything other than making the problem more difficult, rather than impossible.

 

By looking at the state of every transistor, you can identify the logic gates, latches, etc. From that you can work out the datapaths and control logic, from that you can work out the instructions executed and the data operated on, from that you can piece together the assembly listing.

Link to comment
Share on other sites

 

It is orders of magnitude simpler to decipher assembly code (even though it is almost impossible, in the general case) but I can't see that you are doing anything other than making the problem more difficult, rather than impossible.

 

By looking at the state of every transistor, you can identify the logic gates, latches, etc. From that you can work out the datapaths and control logic, from that you can work out the instructions executed and the data operated on, from that you can piece together the assembly listing.

That makes sense. I wonder what would happen, though, if you had a virtual machine within a virtual machine and you had the same restrictions. Would having an infinite amount of them inside each other make it harder to discern the virtual machines?

Link to comment
Share on other sites

I wonder what would happen, though, if you had a virtual machine within a virtual machine and you had the same restrictions. Would having an infinite amount of them inside each other make it harder to discern the virtual machines?

 

If you specify an infinitely deep nest of machines, then your input to your top-level, universal machine is just some encoding of that infinite nest. Because each machine, when read and run by its parent, will do the same thing for its input (its child machine) and so on, by the definition of a simulation, the program will never halt.

 

What's interesting is that if we consider this in practice, without concern for infinite resources, a typical VM runs simultaneously with the computer running it, where the parent system is running some daemons, the windowing system, maybe browsing SFN, and so the processes of both machines have to be interleaved by some multithreading mechanism. There are established schemes for this, but if we require that any given child-VM eventually begins its simulation as per the point of this hypothetical, it might be impossible, namely if we allow them to run other such simulations, which you do naturally by allotting unlimited resources to the universal machine. I'm not sure, there might be a way around it, or there might be some special implied condition for which there's no way around, but this piques the problem—we might never be able to discern all of the VM's, precisely because they're infinite and can be nested.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.