[OS] Existing management exercises

Article Directory

P1.

A system uses dynamic partition allocation to manage memory. The memory space is 640K, and the high-end 40K is used to store the operating system. During memory allocation, the system preferentially uses the space at the lower end of the free area. For the following request sequence:
Assignment 1 application 130K,
assignment 2 application 60K,
assignment 3 application 100K,
assignment 2 release 60K,
assignment 4 application 200K,
assignment 3 release 100K,
assignment 1 release 130K,
assignment 5 application 140K,
assignment 6 application 60K ,
Assignment 7 applies for 50K,
Assignment 6 releases 60K, and
draw a chart showing the actual memory usage after the first adaptation algorithm and the best adaptation algorithm are used for memory allocation and recovery.

answer.

Insert picture description here

  • The optimal adaptation process is similar.

P2.

  • In a paging system, the main memory capacity is 64KB, and the page size is 1K. For a 4-page job, pages 0, 1, 2, and 3 are allocated to blocks 2, 4, 6, and 7 of the main memory. :
  • Convert the decimal logical addresses 1023, 2500, 3500, 4500 to physical addresses;
  • Take the decimal logical address 1023 as an example to draw the address conversion process diagram.

answer.

Insert picture description here

  • [Tip] Logical address/page size = quotient... remainder, quotient is the page number, then the physical address is equal to the block number corresponding to the page number × page size, plus the remainder calculated before.

P3.

  • A system adopts a page-based storage management strategy, with 32 logical pages, 2KB per page, and 1MB physical space.
  • Write out the format of the logical address.
  • If you do not consider access rights, etc., how many items are there in the page table of a process? How many digits are there at least for each item?
  • If the physical space is reduced by half, how should the page table structure be changed?

answer.

Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44246009/article/details/108554090