Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Compare the memory organization schemes of contiguous memory allocation, pure

ID: 3704828 • Letter: 1

Question

1. Compare the memory organization schemes of contiguous memory allocation, pure segmentation, and pure paging with respect to the following issues:

a. External fragmentation (6 points)

b. Internal fragmentation (6 points)

c. Ability to share code across processes (6 points)

2. Consider the following segment table:

Segment Base Length/Limit

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?

Segment# offset

a. 0, 430 (5 points)

b. 1, 10 (5 points)

c. 2, 200 (5 points)

d. 3, 400 (5 points)

3. Please explain what is swapping (5 points)? What are the advantages and disadvantages of swapping? (5 points)

4. Explain why mobile operating systems such as iOS and Android do not support swapping? (6 points)

5. Assuming a 512 bytes memory and the page size is 32 bytes, CPU can address 1 byte. What are the page numbers and offsets for the following logical address references:

a. 24 (5 points)

b. 128 (5 points)

c. 267 (5 points)

d. 500 (5 points)

6. Assuming a 512 bytes memory and the page size is 32 bytes, CPU can address 1 word (4 bytes):

a. How many bit for the physical address? (4 points)

How many bit for the logical address?

Explanation / Answer

Hi Dear,

As per the chegg policy, please post one Question per post. Question os too long.

I hvae answered Q1 in great detail.

Contiguous memory allocation scheme suffers from external fragmentation as address spaces are allocated contiguously and holes develop as old processes die and new processes are initiated. It also does not allow processes to share code, since a process's virtual memory segment is not broken into non-contiguous fine-grained segments.


Pure segmentation also suffers from external fragmentation as a segment of a process is laid out contiguously in physical memory and fragmentation would occur as segments of dead processes are replaced by segments of new processes. Segmentation, however, enables processes to share code; for instance, two different processes could share a code segment but have distinct date segments.


Pure paging does not suffer from external fragmentation, but instead suffers from internal fragmentations. Processes are allocated in page granularity and if a page is not completely utilized, it results in internal fragmentation and a corresponding wastage of space. Paging also enables processes to share code at the granularity of pages.

Please DONT forgot to rate my answer. We are working hard for you Guys!!

Cheers!