Operating System Page Replacements Computer Science Essay

Published: Last Edited:

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

The operating system employed to perform tasks such as sending in through the keyboard input, sending output to the monitor screen, keeping the files and directories to be maintained in a safe, and of course control all the additional devices such as disk drives, printers and other devices. An operating system is the program that, after being initially loaded into the computer by a boot program, manages all the other programs in a computer [1].For large systems, the operating system has a big task and function, in which the operating system is responsible for managing the programs that run other applications within the same time without each other or collide with one another crash. The operating system also has responsibility for security, ensuring that users who do not are not able to access the computer system.

Page replacement is the operating system can move the process of physical memory, and then delete all the frames that were initially used, and reduce the amount of multiprogramming by reducing the current process. In a computer operating system that uses paging for virtual memory memory management, page replacement algorithms decide which memory pages to page out (swap out, write to disk) when a page of memory needs to be allocated [2]. An order can be emptied by transferring the contents into the space of transfer and then change all the page table to indicate that the site will be removed and not in physical memory. Then an empty frame can be used by the page to be in physical memory. If there is no blank frame then there are two pages of transfers in and out of physical memory. This of course adds time in the page fault handling automatically add the effective access time. There are several strategies of page replacement such as First In First Out (FIFO), and Not Recently Used, Least Recently Used (LRU), Optimal and random page replacement.

All organizations, including government, military, financial institutions, hospitals, and private businesses, collect and store a wealth of information about, customers employees, the study results, and financial operations. Much of this information is collected, processed and stored electronically and sent via network to other computers. Protecting confidential information is a business requirement, and in many cases also an ethical requirements and laws. For the individual, information security has a significant impact on privacy and identity theft. Field of information security has grown significantly in recent years. There are various methods of security to protect data such as Encryption, Firewalls, Authentication, Backup and Antivirus.

Main body

A computer operating system which utilizes paging for memory management, page replacement algorithms are used to decide what pages to swap out when a page needs to be swapped in. That happens when a page fault occurs. The principle used in the First In First Out (FIFO) algorithm is the page that changed were the oldest page in memory. This algorithm is most easily implemented, but most are rarely used in its original form, often combined with other algorithms. The implementation of the algorithm by using FIFO queues is to indicate the current page in the memory. Each new page which is accessible placed on the back or known as tail of the queue. When the queue is full and there is a new page then the page is accessible at the front known head of the queue to be replaced. The weakness of the FIFO algorithm is not always a good performance. This is because it is possible that the page was just out of memory it takes back. In addition, in some cases even a page error rate increased with increasing the number of frames, known as Belady anomaly.

Not Recently Used (NRU) .In order to allow the operating system to gather useful statistics about the pages is used and not used, most computers with virtual memory has two status bits associated with each site. R set each time this page referenced read or write. M determined when the page is written or modified. Bits contained in each page table entry, as shown in Figure 1 is important to realize that a bit to be updated on every memory reference, so important that they are set by the hardware. After a bit has been set to 1, it remains until the operating system to reset to 0 in software.

figure 1 show the four class of NRU page replacement

The NRU (Not Recently Used) algorithm to remove the page at random from

The lowest numbered non empty class. Implicit in this algorithm is that it is better

delete a site modification that has not been cited in at least one clock ticks

of the net site of heavy use. The main attraction of NRU is that it is easy to understand, efficient enough to implement, and provide performance, while certainly not optimal, may be sufficient.

Least Recently Used (LRU) replacement algorithm is similar to the NRU name but different in the fact that the LRU track site usage over time, while the NRU only see usage in the last hour intervals. LRU works on the idea that the page has been most widely used in the last few instructions are most likely to use is the use of the future as well. While LRU can provide near optimal performance in theory is almost as good as the Adaptive Replacement Cache is very expensive to implement in practice. There are several methods for the implementation of this algorithm that tries to cut costs but still as much as possible the performance. The most expensive is the linked list method, which uses a linked list containing all the pages in memory. At the back is a list of current site use and in front of the site is currently used. The cost of this exercise lies in the fact that the item in the list will be transferred on each memory reference, which is very time consuming process. Each time the page needs to be replaced, the operating system will choose the site with the lowest counter, and swap it out. With the hardware now, this is not feasible because the necessary hardware counter does not exist. Because the cost of implementation, one can consider the algorithm as the following is similar to LRU, but offers much more expensive. A significant gain from the LRU algorithm is that agreeing to a complete statistical analysis. On the other hand, the disadvantage of LRU is that under the declining performance of many references that are very common pattern.

Optimal page replacement algorithm replaces the page that is not used for a prolonged period. It is lowest page fault rate of all algorithms. Requires advanced knowledge of string reference page. It is easy to explain, but it is not possible to implement. It goes like this. The advantage of the replacement page is to avoid anomalies Belady and also has the lowest error rate of the algorithm transfers to the pages of other websites. Although it seems easy to explain, but this algorithm is difficult or nearly impossible to perform because the operating system must be able to find pages that will reach further, but the operating system can not find the page that will appear in the future.

Random algorithm replaces a random page in memory. Page replacement algorithm may be the simplest is the random replacement page. If a page is often used is expelled, the performance may suffer. For example, several pages, which contain initialization code that the program might never be longer needed for the program, may be deported instead. So there are performance benefits are available by selecting the appropriate page. Random page-replacement

algorithm using a formal model of a predetermined.