1 / 31

Memory Problems (I.1.1)

Memory Problems (I.1.1). Prof. Sin-Min Lee Department of Mathematics and Computer Science. The code and any static data will not grow or shrink during execution. A processes logical addresses are usually contiguous in the range (0,N-1).

Télécharger la présentation

Memory Problems (I.1.1)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Memory Problems (I.1.1) Prof. Sin-Min Lee Department of Mathematics and Computer Science

  2. The code and any static data will not grow or shrink during execution.

  3. A processes logical addresses are usually contiguous in the range (0,N-1).

  4. Swapping is used only when it is necessary to remove an entire process from memory.

  5. PDP-11, UNIVAC 1100 and others. Seperate instruction and data spaces

  6. Example: A virtual memory has a page size of 1024 words, eight virtual pages, and four physical page frames. The page table is as follows: • List the virtual addresses that will cause page faults.

  7. b. What are the physical addresses for virtual addresses 0, 3728, 1023, 1024, 1025, 7800, and 4096?

  8. the page is the same size as the page frame

  9. Each page is placed in a page frame. We have internal fragmentation

  10. Explain the difference between internal and external fragmentation. Answer: Internal fragmentation is the area in a region or a page that is not used by the job occupying that region or page. This space is unavailable for use by the system until that job is finished and the page or region is released .

  11. Given memory partitions of l00K. 500K, 200K, 300K, and 600K (in order), how would each of the First-fit algorithm place processes of 212K, 417K, 112K, and 426K (in order)? Answer: First-fit: 212K is put in 500K panition 417K is put in 600K partition 112K is put in 288K partition (new partition 288K = 500K-212K) 426K must wait 100 (1)212 500 (3)112 200 300 (2)417 600

  12. Given memory partitions of l00K. 500K, 200K, 300K, and 600K (in order), how would each of the Best-fit algorithm place processes of 212K, 417K, 112K, and 426K (in order)? Answer: Best-fit: 212K is put in 300K partition 417K is put in 500K partition 112K is put in 2OOK partition 426K is put in 600K partition 100 (2)417 500 (3) 112  200 (1)212- 300 (4) 426 600

  13. Given memory partitions of l00K. 500K, 200K, 300K, and 600K (in order), how would each of the Worst-fit algorithm place processes of 212K, 417K, 112K, and 426K (in order)? 100 Answer: Worst-fit: 212K is put in 600K partition 417K is put in 500K partition 112K is put in 388K partition 426K must wait 500 (2)417 200 300 (1)212 600 (3)112

  14. Consider the following segment table: Segment Base Length 0 219 600 1 2300 14 2 90 100 3 1327 580 4 1952 96 What are the physical addresses for the following logical addresses? a. 0,430 b. 1,10 c. 2,500 d. 3,400 e. 4,112 Answer: a. 219 + 430 = 649 b. 2300 + 10 = 2310 c. illegal reference. trap to operating system d. 1327 + 400 =1727 e. illegal reference, trap to operating system

More Related