1. Compare and contrast internal fragmentation and external fragmentation. Expla
ID: 640200 • Letter: 1
Question
1. Compare and contrast internal fragmentation and external fragmentation. Explain the circumstances where one might be preferred over the other.
2. If a program has 471 bytes and will be loaded into page frames of 100 bytes each, and the instruction to be used is at byte 132, answer the following questions:
a. How many pages are needed to store the entire job?
b. Compute the page number and the exact displacement for each of the byte addresses where the data is stored. (Remember that page numbering starts at zero).
Please answer those questions, not use other examples... Show work as well for get full credit!
Explanation / Answer
1)
AnswerFragmentation occurs in a dynamic memory allocation system when many of the free blocks are too small to satisfy any request.
External Fragmentation: External Fragmentation happens when a dynamic memory allocation algorithm allocates some memory and a small piece is left over that cannot be effectively used. If too much external fragmentation occurs, the amount of usable memory is drastically reduced. Total memory space exists to satisfy a request, but it is not contiguous.
Internal Fragmentation: Internal fragmentation is the space wasted inside of allocated memory blocks because of restriction on the allowed sizes of allocated blocks. Allocated memory may be slightly larger than requested memory; this size difference is memory internal to a partition, but not being used
Another Definition:
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.
2)
a)
471/100 + 1=5
To store page number: 3 bits
To store offset:7 bits
b)
The first page begins at address 0. The page size is 256, so page 1 (the second page), offset (displacement) 0 corresponds to address 256. Address 266 would be offset 10 on page 1. Address 514 would be page 2, offset 2. See how this works?
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.