Paging Memory Management Program Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

In the computer operating system, paging memory management program, which a computer can store and retrieve data from main memory used to store one secondary school. In the paged memory management scheme, the operating system retrieves the size of the block from the same secondary storage of data called pages. The main advantage is to provide paging, which allows the physical address space of a process is not continuous. Time spent before the paging, the system must continuously adapt to the program storage, resulting in different storage and dispersion problems. A virtual memory paging is implemented in most modern general-purpose operating system, an important part of allowing them to use the data, is not suitable to the physical random access memory (RAM) of disk storage.

Strategy for page replacement is the optimal page replacement is the best page replacement algorithm is easy to describe, but impossible to implement. Currently if a page fault occurs, the number of pages set in memory. These pages will be quoted on the very next instruction that the page contains the instructions. Other pages may not refer to 10,100, or 1,000 years later instructions. Each page can be executed before the page with the first number of instructions to be referenced. Algorithm is simply the best web page; the page with the highest tag should be removed. If a page will not be used for 800 million instructions, another page will not be used for six million instructions, the first push to eliminate the error page put it back to get as far as possible in the future. Computers and people are trying to delay as long as unpleasant as they can. The only problem with this algorithm is that it is impossible to achieve. Wrong time on the page, the operating system cannot know every page, the reference for the future. Running the program on the simulator and keeping track of all the page references, it is possible to achieve optimal page replacement in the second run using the first page of the reference information collected during the operation. In this way one can compare with the best, realization algorithm. If the operating system implementation, performance, that is, only 1 percent or more of the optimization algorithm to find a better algorithm will yield a maximum cost increase of 1 percentage point energy difference. To avoid any possible confusion, it should be clear, this page references refer only to a due process logs, and then only to a specific measured input. The page replacement algorithm derived from it that is so specific to a program and input data.

Another strategy for page replacement is the least recently used (LRU) algorithm replaces the page which has not been accessed for the longest time. It performs very well, but it is difficult to implement. There are several Implementations of it. Every time a page is read, it is moved to the head of the list. The next page to replace is the one at the tail of the list. It is very hard to perform this task so fast that it does not slow down the whole system, because memory accesses occur very frequently. We use a bit matrix consisting of n * n bits, where n is the number of physical pages in memory referring to [Tanenbaum, 2001] for details on this implementation. If there are many pages, the bit matrix grows very big. Every time a page is read, the current time is stored in a variable of this page. The next page to swap out is the one with the lowest time of last access. This is hardly implementable because the timer needs more than 32 bit to be fine-granular enough and finding the page with the lowest access time is very expensive.

More strategy for page replacement is the FIFO (First-in-First-out) algorithm. The FIFO (First-in-First-out) is extremely simple: It removes the page with the earliest creation time. This can be implemented using a list: New pages are inserted at the head of the list, and the page at the tail is swapped out. Another implementation is using a ring. Every time a page has to be replaced, the page the pointer points at is swapped out and at the same place the new page is swapped in. After this, the pointer moves to the next page. The FIFO algorithm's performance is rather bad. It is a bad choice, because the page would have to be recalled to main memory instantly, which results an increased rate of page fault.

There another strategy for page replacement is the second-chance algorithm. The second-chance is very similar to FIFO. However, it interferes with the accessing process every page has, in addition to its "dirty bit", a "referenced bit" (r-bit). Every time a page is accessed, the r-bit is set. The replacement process works like FIFO, except that when a page's r-bit is set, instead of replacing it, the r-bit is unset, the page is moved to the list's tail or the pointer moves to the next page is examined. Second Chances performs better than FIFO, but it is still far from optimal.

Strategy for page replacement is the aging algorithm. The aging is somewhat tricky. It uses a bit field of w bits for each page in order to track its accessing profile. Every time a page is read, the first bit of the page's bit field is set. Every n instructions all pages' bit fields are right-shifted by one bit. The next page to replace is the one with the lowest numerical value of its bit field. If there are several pages having the same value, an arbitrary page is chosen. The aging algorithm works very well in many cases, and sometimes even better than LRU, because it looks behind the last access. It furthermore is rather easy to implement, because there are no expensive actions to perform when reading a page. However, finding the page with the lowest bit field value usually takes some time. Thus, it might be necessary to predetermine the next page to be swapped out in background.

Lastly strategy for page replacement is the NRU (not-recently-used) algorithm. The NRU uses an r-bit for every page. Every time a page is read, the r-bit is set. Periodically, all r-bits are unset. When a page fault occurs, an arbitrary page with r-bit unset is swapped out. NRU is actually aging with a bit field width of 1, and it does not perform very well. It's a page at random from the lowest numbered nonempty class. Implicit in this algorithm is that it is better to remove a modified page that has not been referenced in at least one clock tick typically 20m sec than a clean page that is in heavy use. The main problem with NFU is that it never forgets anything. For example, in a multipass compiler, pages that were heavily used during pass 1 may still have a high count well into later passes. In fact, if pass 1 happens to have the longest execution time of all the passes, the pages containing the code for subsequent passes may always have lower counts than the pass 1 pages. Consequently, the operating system will remove useful pages instead of pages no longer in use. The main attraction of NRU is that it is easy to understand, moderately efficient to implement, and gives a performance that, while certainly not optimal, may be adequate.

In Conclusions, there are many types of page replacement strategic like optimal page replacement, the least recently used (LRU) replacement, FIFO (First-in-First-out) page replacement, second-chance page replacement, aging page replacement and NRU (not-recently-used) page replacement. Each of them has their own advantages and disadvantages. The main advantage is to provide paging, which allows the physical address space of a process is not continuous. Time spent before the paging, the system must continuously adapt to the program storage, resulting in different storage and dispersion problems.

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.