Concepts of One-read operating system by page version 6

Source: Internet
Author: User

 The paging memory management solution allows the physical address space of a process to be non-consecutive. Paging avoids the trouble of backing up memory blocks of different sizes to swap space.

 

Physical memory is divided into fixed-size blocks, called frames ). Logical Memory is also divided into blocks of the same size, called pages. When a process needs to be executed, its pages are transferred from the backup storage to available memory frames. Backup storage is also divided into fixed-size blocks, with the same size as the memory frame.

Each address generated by the CPU is divided into two parts: page number (P) and page offset (d ). The page number is used as the index in the page table. The page table contains the base address of the physical memory of each page. The combination of these base addresses and page offsets forms a physical address and can be sent to a physical unit.

One important feature of paging is the separation of memory from the actual physical memory. UserProgramThe memory is processed as a whole block, and it only contains one process. In fact, a user process is distributed in the physical memory together with other programs. In the user's opinion, the difference between the memory and the actual physical memory is achieved through address translation hardware. The logical address is changed to a physical address. This type of ing is unknown to users, but is controlled by the operating system.

Because the operating system manages the memory, it must know the allocation details of the physical memory: The allocated frames, the empty frames, the total number of frames, and so on. This information is usually stored in a data structure called a frame table. In the frame table, each entry corresponds to a frame, indicating whether the frame is idle or occupied. If it is occupied, it is occupied by the page of the process.

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.