Skip to content

The problem

Hanna edited this page Dec 16, 2018 · 1 revision

Virtual memory allows you to execute processes that do not fit entirely in physical memory. This technique gives the impression of a homogeneous, enormous memory, which at the same time is not a limitation at the time of writing the program. It supports multi-program, and the program start-up time is shorter because you do not need to load the entire program into memory.

On-demand pagination is related to the exchange of pages between first-order (operational, physical) and second-order (mass, disk) memories. It is implemented by means of a page table that contains the frame number in the memory or the disk's address of the page and the correctness bit of the reference. If the validation bit is set, the page is in the main memory. Otherwise, a missing page error is generated and the paging procedure that enters the needed page into the main memory starts. Then the operating system checks whether the reference was allowed, finds a free frame, and requests the page to be retrieved from the disk, as well as modifies the table of pages.

In the absence of a free frame, a page exchange algorithm is used. The page table checks whether the page to be freed from the main memory has been modified, because the modified page should be previously saved to the disk. The page replacement algorithm is to minimize the number of page errors.

The project will present a comparison of such algorithms.

Basic assumptions

  • Comparison of several different page exchange algorithms in terms of:

   - the number of frames,

   - the number of references to memory,

   - number of page errors,

   - number of entries in memory,

   - the duration of the algorithm.

  • All algorithms work on a page table in a 32-bit address space.

  • All pages in the page table have 4 KB.

  • The counter in the aging algorithm is 16-bit.

  • The following will be compared:

   - clock algorithm,

   - LRU (Last Recently Used),

   - aging,

   - optimal algorithm,

   and then the best one will be chosen together with justification.