16. List the 3 types of memory partitions as discussed in class. 17. In which of
ID: 3915951 • Letter: 1
Question
16. List the 3 types of memory partitions as discussed in class. 17. In which of the 3 types of memory are static variables stored? 18. There are two things the NOP instruction accomplishes while doing nothing, list one 19. Given ecx = 0x0000007B, so cl=0x7B, what is the minimum value that when added, would set the OVERFLOW flag? add cl, ; minimum value to cause OF to be set Short Answer (40 pts) 20, (4 pts) Given esp = 0x 18F448, what is value of eax after executing a "pop eax" instruction? What is esp after executing the pop instruction? 0018FF44 BO CA CC BE EF BE AD DE eax esp 21. (12 pts) Given that l ebp-0x14 ] refers to a local variable named tmpl): 0nDE76A1 and ebp = 0x1 288C. CODE A mov ecx, [ebp0x14] push ecx call funcl CODE B: lea ecx, [ebp - 0x14] push ec call funcl VS a. (4 pts) Briefly describe the difference between the CODE A instructions and the CODE B instructions b. (4 pts) For each one, show what ecx looks like on the stack. Stack CODE A: CODE B 0x12880 c. (4 pts) Show the matching C function call for each 2017 01-CS 3843 Computer Organization-Exam #2 Page 2Explanation / Answer
16)Answer:
memory can be partitioned - fixed, variable and dynamic partitioning.
Fixed Partitioning
Let us think about the jewelry box that store rings. Different pieces of jewelry represent different computer processes. The figure 1 below represents a jewelry box that displays rings
This box has been partitioned into equal parts. This kind of partitioning is ideal for our jewelry (rings only) collection provided we always acquire rings with sizes less than these fixed partitions. But we never have identical jewelry of the same size. Item 1 & 2 fit almost perfectly with little or no wasted space (partition almost the same size as the process). Item 3 however, leaves a lot more space unoccupied (small process in large partition) while item 4 has no partition large enough to fit (large process with unavailable sized partition). We have just demonstrated fixed partitioning in memory management.
Fixed partitioning is therefore defined as the system of dividing memory into non-overlapping (fixed/unmovable/static) sizes. A process may be loaded into a partition of equal or greater size. A process is also confined to its allocated partition.
If we have comparatively small processes with respect to the fixed partition sizes, this poses a big problem. This results in occupying all partitions with lots of unoccupied space left. This unoccupied space is known as fragmentation. Within the fixed partition context, this is known as Internal Fragmentation (IF). This is because of unused space created by a process within its allocated partition (internal). An alternate solution to address these problems is Variable Partitioning.
Variable Partitioning
In the case of the jewelry box shown below, we anticipate that we possess different jewelry items with different sizes. So we divide the area of our jewelry box into partitions of different sizes. This way, smaller items of jewelry (small processes) are assigned small partitions while the bigger partitions are saved for the bigger items (large processes).
Variable partitioning is therefore defined as the system of dividing memory into non-overlapping (unmovable/static) but variable sizes. This system of partitioning is more flexible than the fixed partitioning configuration, but it is still not the most ideal solution. Small processes are fit into small partitions (items 1) and large processes fit into larger partitions (2 & 3). These processes do not necessarily fit exactly. Even though there are other unoccupied partitions. Item 3 & 4 are larger processes of the same size, but memory has only one available partition that can fit either of them.
The flexibility offered in variable partitioning still does not completely solve our problems
Dynamic Partitioning
Let us examine a typical 64MB space of memory and let's assume that the first 8MB of memory is reserved for the operating system
Jobs are given only as much memory as they request when theyare loaded
•
Available memory is kept in contiguous blocks
•
Memory waste is comparatively small
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.