Demand paging gives that pages could only be brought into memory if the running process acts them. This is usually referred to as lazy evaluation as only those pages operated by the process are swapped from secondary storage to main memory. Contrast this to accurate swapping, where all memory for a process is changed from secondary storage to main memory in the mean while the process startup.
Usually, to gain this process a page table implementation is needed. The page table maps logical storage to physical storage. The page table uses a bitwise operator to check if a page is invalid or valid. A valid page is one that currently has in main memory. An invalid page is one that currently has in secondary storage. When a process tries to accept a page, the following steps are usually followed: