debugMinor
How does one program crashing not crash the entire system?
Viewed 0 times
crashingtheentiresystemprogramonedoeshownotcrash
Problem
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?
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?
Solution
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.
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.
Context
StackExchange Computer Science Q#66488, answer score: 2
Revisions (0)
No revisions yet.