Page Size

The page size of a system has a significant impact on overall performance.

Internal fragmentation – smaller page size less internal fragmentation less internal fragmentation better use of main memory.

Smaller page size – more pages per process, larger page tables. In multiprogramming environments this means page tables may be in virtual memory – this may mean a double page fault one to bring in required portion of page table one to bring the required process page.

The graph below shows the effect on page faults of two variables one the page size and the second the number of frames allocated to a process.

 
 

The leftmost graph shows that as page size increases that number of page fault correspondingly increase. This is because the principle of locality of reference is weakened. Eventually as the page size approaches the size of the process the faults begin to decrease.

On the right the graph shows that for fixed page size the faults decrease as the number of pages in memory grows. Thus, a software policy (the amount of memory to allocated to each process) affects a hardware design decision (page size).

Of course the actual size of physical size of memory is important. More memory should reduce page faults. However as main memory is growing the address space used by applications is also growing reducing performance and modern programming techniques such as Object-Oriented programming (which encourages the use of many small program and data modules with references scattered over a large number of objects) reduce the locality of reference within a process.

§ A small page size reduces internal fragmentation.

§ A large page size reduces the number of pages needed, thereby reducing the size of the page table (page table takes up less memory).

§ A large page size reduces the overhead in swapping pages in or out. In addition to the processing time required to a handle a page fault, transferring 2 1K blocks of data from disk is almost twice as long as transferring 1 2K block.

§ A smaller page size, with its finer resolution, is better able to target the process’s locality of references. This reduces the amount of unused information copied back and forth between memory and swapping storage. It also reduces the amount of unused information stored in main memory, making more memory available for useful purposes.


Понравилась статья? Добавь ее в закладку (CTRL+D) и не забудь поделиться с друзьями:  



double arrow
Сейчас читают про: