Operating System Virtual Memory

0

The computer can process more memory than the physical value of a system. This additional memory is actually called virtual memory and is a hard disk component set to mimic computer RAM.

The biggest visible benefit of this program is that the programs can be larger than the virtual memory. Visual memory serves two purposes. First, it allows us to increase the use of virtual memory through disk. Second, it allows us to have memory protection, because each visible address is translated into a local address.

The following are the situations, where the whole system does not need to be fully loaded into large memory.

  • The user's written administrative routes are only used when an error occurs on the data or computer.
  • Certain options and features of the program can be used infrequently.
  • Most tables are provided with a limited amount of address space even if only a small number of tables are used.
  • The ability to create a system that is part of the memory can contradict many benefits.
  • A small I / O number will be required to load or rotate each user's application into memory.
  • The application will no longer be restricted to the amount of virtual memory available.
  • Each user program can take up less physical memory, and other programs can be run simultaneously, with a corresponding increase in CPU usage and installation.

Modern microprocessors are designed for standard purpose use, a memory management unit, or MMU, built into the hardware. MMU's job is to translate real addresses into portable addresses. A basic example is given below -

infostore.co.in

Virtual memory is often used on demand. It can also be used in a segmentation system. Demand split can also be used to provide visual memory.

Demand Paging

The desired pairing system is exactly the same as the alternate pairing system where processes remain in second memory and pages are loaded only on demand, not earlier. When a change of context occurs, the application does not copy any old program pages to disk or other pages of the new program in large memory.

While performing a program, if the program identifies a page that is not available in large memory because it was removed in the past, the processor treats this invalid memory record as a page error and transfers control from the system to the operating system so that the page returns to memory.

infostore.co.in

Pros

The following are the benefits of Demand Paging -

  • Great visual memory.
  • Effective use of memory.
  • There is no limit to the level of multiprogramming.

Cons

  • The number of tables and the number of processors that handle page crashes are larger than in the case of simple sheet management strategies.

Page Replacement Algorithm

Page replacement algorithms are techniques used when the operating system determines which memory pages will be exchanged, and write to disk when the memory page needs to be shared. Sub-page loading occurs whenever a page error occurs and the free page cannot be used to calculate distribution intentions assuming the pages are not available or the number of free pages is less than the required pages.

When a page that has been selected to replace and removed, is redirected, it should read from disk, and this requires I / O completion. algorithm is better.

The page replacement algorithm looks at the limited information about access to the pages provided by the hardware, and then tries to determine which pages should be changed to reduce the total number of pages missed, while measuring the cost of basic storage time and processor algorithm itself. There are many algorithms for page replacement. We test the algorithm by running it on a specific memory reference string and calculating the number of page errors,

Reference String

The memory cable is called the memory cable. Reference cables are made incorrectly or by following a set procedure and recording the address of each reference memory. The last option reveals a large amount of data, in which we recognize two things.

  • With the page size provided, we only need to look at the page number, not the entire address.
  • If we point to page p, then any quick follow-up to page p leads will never cause a page error. Page p will be in memory after the initial reference; the following immediate indications will not make a mistake.
  • For example, consider the following address - 123,215,600,1234,76,96
  • At a page size 100, the reference thread is 1,2,6,12,0,0

First In First Out algorithm (FIFO)

  • The old page in big memory is the one that will be chosen to replace.
  • Easy to use, keep a list, retrieve pages from the tail and add new pages to the head.infostore.co.in

Optimal page algorithm

  • The best page replacement algorithm has the lowest error rate in all algorithms. A suitable page replacement algorithm exists, and it is called OPT or MIN.
  • Change the page that will not be used for a very long time. Use the time at which the page will be used.
    infostore.co.in

 Last Recently Used Algorithm (LRUA)

  • A page that has not been used for a long time in large memory is the one that will be selected to replace.
  • It's easy to use, save lists, turn pages by looking back in time.

infostore.co.in
Buffering page algorithm

  • For the process to start quickly, keep a pool of free frames.
  • In the Error page, select a page to replace it.
  • Write a new page in the free pool frame, mark the page table and restart the process.
  • Now write the dirty page to the disk and place the frame holding the inserted page in the free pool.

Frequent algorithm (LFU)

  • The page with the lowest value will be the one to choose to replace.
  • This algorithm deals with the situation where the page is most often used at the beginning of the process, but it is not used again.

Most widely used algorithm (MFU)

  • This algorithm is based on the argument that a page with a very small number may have recently been imported and will still be used.

Post a Comment

0Comments

Please writing your opinion

Post a Comment (0)