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

Memory, physical address and virtual address questions Consider a swapping syste

ID: 3857877 • Letter: M

Question

Memory, physical address and virtual address questions

Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB, 9 MB, 12 MB, and 15 MB. Which hole is taken for successive segment requests of (a) 12 MB (b) 10 MB (c) 9 MB for first fit? Now repeat, the question for best, fit, worst fit, and next. fit. What is the difference between a physical address and a virtual address? For each of the following decimal virtual addresses, compute the virtual page number and offset for a 4-KB page and for an 8 KB page: 20000, 32708, 60000.

Explanation / Answer

1)Answer:

First fit takes 20 MB, 10 MB, 18 MB. Best fit takes 12 MB, 10 MB, and 9 MB. Worst fit takes 20 MB, 18 MB, and 15 MB. Next fit takes 20 MB, 18 MB, and 9 MB.

2)Answer:

Physicaladdressesrefertohardwareaddressesofphysicalmemory. Virtualaddressesrefertothevirtualstoreviewedbytheprocess. •virtualaddressesmightbethesameasphysicaladdresses •mightbedifferent,inwhichcasevirtualaddressesmustbemappedintophysical addresses.

virtualspaceislimitedbysizeofvirtualaddresses(notphysicaladdresses) •virtualspaceandphysicalmemoryspaceareindependent.