Operating System Learning 28/9/2015

Source: Internet
Author: User

Operating System Learning 28/9/2015

Virtual Memory: The program can be larger than the memory, allowing the execution of the program is not all in memory, on-demand paging.

On-Demand paging: By setting a valid invalid bit, the page is valid and in memory, invalid indicates that the page is not within the logical space of the process or that the page is legitimate but on disk. An error trap occurs when a process tries to access a page with an invalid bit. Processing: 1. Check the Internal page table of the process to determine if the reference is legal and, if it is illegal, to terminate the process and, if it is legal, to invoke the page; 2. Find a free frame in memory, drop the page from the disk into the frame, 3. Modify the Internal table and page table of the process and 4. (Re-fetch, decode, etc.)

The fork () call creates a child process as a copy of the parent process, copying the page that belongs to the parent process, which is not necessary and can be replicated on a write-time.

Page Replacement algorithm:

FIFO: Select the oldest page, the FIFO queue to manage the page, each time the team first, the new page added to the end of the team. Generates a Belady exception (the page error rate may increase as the number of frames allocated increases).

Optimal Displacement (opt/min): Replaces pages that will not be used for the longest time in the future. is the lowest page error rate in all algorithms, with no Belady exception. Difficult to achieve, mainly used for comparative studies.

LRU least Recently used algorithm: Select pages that are not used for the longest time. The use of counters or stacks to maintain the most recent time is often used as a page replacement algorithm.

Approximate LRU: by reference bit. 1. Attach the reference bit algorithm, using 8 bits to indicate whether the page has been referenced in the last 8 cycles, and the minimum value is substituted. 2. Two chance algorithm, based on FIFO, a reference bit, for 1 gives second chance. 3. Enhanced two-chance algorithm, two reference bits, recently used and recently modified, divided into 4 categories.

Operating System Learning 28/9/2015

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.