Scary RAM usage

2»

Comments

  • Reply 21 of 21
    lundylundy Posts: 4,466member
    Quote:

    Originally posted by ast3r3x

    What are pageins?



    When a program references data that it needs, the operating system may have at some point moved the memory page (4096 bytes) containing that data to the disk in order to make room for other pages that other programs were asking for.



    So the program executes an instruction, the hardware in the CPU detects that the page containing thte requested data is not in memory (it keeps a table of these), and raises what is known as a "page fault", or interrupt to the OS. The OS then finds out where on disk the data page is, reads it into RAM, and executes it (while waiting for the data from disk, the OS can let other programs run). This is known as a "page-in".



    You can also get page-ins because the OS was trying to be clever and guess what data an application might want in the future, and instead of reading it at the launch, just referenced that the data was already in the VM.



    So page-outs only should happen when there is no more room in RAM for a needed piece of data, but page-ins can happen for other reasons.
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.