理解Linux中paging || demand paging || anticipatory paging

  • paging

    wikipedia

    In computer operating systems, paging is a memory management scheme by which a computer stores and retrieves data from secondary storage for use in main memory.

    In this shceme, the operating system retrieves data from secondary storage in same-size blocks called pages.

    Paging is an important part of virual memory implementations in modern operating systems, using secondary storage to let programs exceed the size of available physical memory.

    main memory is called “RAM”(an acronym of “random - access memory”) and secondary storage is called “disk” (a shorthand for “hard disk drive, drum memory or solid-state drive”)

  • pages

    pages became the units exchanged between disk and RAM.

    A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described by a single entry in the page table.

    It is the smallest unit of data for mamory management in a virtual memory operating system.

    Similarly, a page frame is the smallest fixed-length contiguous block of physical memory into which memory pages are mapped by the operating system.

    A transfer of pages between main memory and an auxiliary store, such as a hard disk drive, is reffered to as paging or swapping.

  • Page replacement techniques

    from paging, page replacement techniques:

    1. demand paging

      Refered from wikipedia, demand paging (as opposed to anticipatory paging) is a method of virtual memory management.

      The OS copies a disk page into physical memory only if an attempt is made to access it and that page is not already in memory.

      It is an example of a lazy loading technique.

    2. anticipatory paging

      Also called swap prefetch, predicts which pages will be references soon, to minimize future page faults.

    3. free page queue, stealing, and reclamation
    4. pre-cleaning
  • 前情回顾

    从上文可见,想要理解paging,需要先理解:

    • 《理解Linux中secondary storage》
    • 《理解Linux中virtual memory 》
    • 《理解Computer中Address space\MMU\PTE\TLB\Page table\Page out》
  • 其他主题

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值