3
$\begingroup$

In Windows, if you write a random assembly program that has a random jump to an address that doesn't exist, the program crashes and Windows says something went wrong with the program.

Since each computer system is essentially a constant execution of assembly, how does the one program crashing not cause the entire system to crash with it?

$\endgroup$
2
$\begingroup$

Probably you should read something about OS memory management.

If the program is running it has memory which is readable, memory which is writable and both. If it tries to go beyond its permissions, OS kills it and reports to you in a way you call "crash".

That's all was very roughly speaking.

$\endgroup$
0
$\begingroup$

As I understand it, the program runs in "protected mode". Presumeably this means that every memory call or address is checked against the memory assigned to it. If it is outside this range, an error is reported.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.