Quantcast
Channel: Challenges about the amount and characteristics of code within an executable file loaded into memory per each process - Stack Overflow
Viewing all articles
Browse latest Browse all 3

Challenges about the amount and characteristics of code within an executable file loaded into memory per each process

$
0
0

When an OS such as Windows wants to run an executable file, first it should load it into RAM. Due to prevent wasting the memory, loading it partly into the memory seems more intellectual than to load it entirely.

So under the condition like that, my questions are:

  1. What happens exactly when the controls arrives to an instruction like JMP containing an address out of range the loaded code? In other words how does the OS recognize that it must stop executing the instruction to avoid jumping to a irrelevant address and how does it calculate which page the related address situated in?

  2. How many pages of code does the OS copy into RAM before jumping to the entry point of a program? I mean whether the OS always copies the fixed amount of code or fixed number of pages into RAM necessarily or it could be uncertain?

  3. If the OS makes a decision that how much code or how many pages should be loaded into memory so what conditions are considered till the decision like that is made?

Thanks to all.


Viewing all articles
Browse latest Browse all 3

Trending Articles