If we were all part of a very advanced simulation system, where none of us actually existed, but where just sentient computer programs, how could we gain control over the main computer, or is this even possible?
closed as too broad by sphennings, Aify, JDługosz Nov 30 '17 at 6:16
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Short Version : As close to impossible as makes no odds.
Modern computers have different privilege levels associated with different processes running on the system. A properly written system would could, in principle, be designed to completely prevent any low-privilege code running (a typical process) from breaking into higher privilege levels.
So in theory your processes trying to take over could be prevents from ever doing so.
In practice an operating system and the programs will typically have some bugs which do allow deliberate breakout from a lower level to a higher one. So in practice your "sentient programs" would need to probe for such bugs and exploit them.
But it's a two sided battle. The higher privilege parts of the system would also be monitoring for breakouts that don't look like normal privilege escalation and try to either modify it's own code before an effective exploit can be made (i.e. after discovery, but before that can be developed into a full blown exploit) or wipe out the offending process.
Gaining control through attempted exploits could be extremely dangerous. You would have no idea how the privileged system functioned and, as a result, could blunder around and wipe out not just your own process, but the entire system. So attempting this seems like a non-starter.
The main problem to even trying this would be that the "sentient program" would have no way of directly interfacing or of writing code in the "native" instruction language of the host system. It would not even have a basic knowledge of the existing of such things, let alone their functionality or how to access it. This contrasts with how hackers operate on our computers, as they generally know the OS in detail (even at a code level) and typically have detailed access to the documentation of systems.
Your programs will not have this. For your sentient programs it would be like trying to develop quantum field theory from "I think therefore I am" - i.e. it won't happen except by blind luck.