AllFreePapers.com - All Free Papers and Essays for All Students
Search

It _page

Autor:   •  January 28, 2016  •  Study Guide  •  289 Words (2 Pages)  •  642 Views

Page 1 of 2

(1)

There are many strategies that an OS can choose which data (or page) to be swapped out. One commonly used strategies used by the OS is the “Least Recently Used (LRU)” approach. As the name suggests, the data or page that is not or least recently used will be swapped out and when it is needed, it will be swapped back into the RAM at the expense of the next LRU been swapped out again.

Of course, there are also other strategies that an OS can adopt, like the First-in-First-out (FIFO) approach.

(2)

A simple way to understand how the computer retrieves the data (or page) in the RAM is this:

The RAM will keep a page table. In this page table, it will tell whether the data is currently in the RAM or whether the data must be retrieved from virtual memory. Besides that, a page table will also contain the address of where the data is stored on virtual memory as well as mappings of virtual addresses to physical addresses.

So when a process (or program) requests access to its data in the RAM, the operating system will retrieve the data in the RAM first using the page table. If there are data stored in the virtual memory, the OS will also map the virtual address provided by the process to the physical address where that memory is stored.

In other words, using the page table, OS is able to tell where the data has been placed in the virtual memory and after finding these data from the virtual memory, it would be placed back into the correct RAM position as designated by the page table.

Of course, the actual mechanism is pretty complex (e.g. there is demand paging, paging replacement etc.)

...

Download as:   txt (1.6 Kb)   pdf (36.1 Kb)   docx (8 Kb)  
Continue for 1 more page »