(This is the older material - click here - for current specification content)

7. Paging

Paging is where relatively inactive pages are temporarily removed from physical memory and placed into virtual memory.

In Windows 8, paging and virtual memory is still a controlled feature, although adjustment is now six layers deep within the relevant option menus, this is quite understandable, as there is very little reason why someone would want to adjust the settings that the operating system has selected as optimum.

The screen capture below is for Windows XP, but the principle remains just the same even with the latest operating system versions.

Paging happens when main memory is getting a bit full. The memory manager will look at the pages pagingin main memory and identify those which haven't been used for a while. They will be moved into virtual memory. When an application needs data held on a page in virtual memory it will be swapped back into main memory and another inactive page may take its place.

In order to manage these pages a 'page table' is created by the memory manager which stores the starting address of each page. The starting address is where the first byte of each page is physically located in memory.

Paging is possible because the memory manager divides primary memory into sections of equal size - called pages. The pages are efficiently set to be the same size as the sectors on the hard disk.

To demonstrate why setting the page size to be the same size as a hard disk sector is efficient, consider a hard disk with a sector size of 4kb, but the memory manager has been set to have a page size of 6kb. When a page of data needs to be stored, it will have to occupy 2 sectors, and wastes the 2kb left over. So it is much more efficient for pages and hard disk sectors to be the same size.

A page can be as little as 512 bytes or as large as 64kb or more.


Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Memory Paging


Copyright © www.teach-ict.com