CS 311
30 pts., due Apr. 18
Each problem is worth eight points. A reminder: Show work.
Starting | Length |
Address | in Words |
1000 | 1000 |
2900 | 500 |
3400 | 800 |
Assume that three new blocks with sizes 500, 1200, and 200 (all sizes in words) are to be loaded in the order listed. For the best-fit and worst-fit placement strategies, show the memory contents after all three blocks have been loaded and the total time for loads/moves. If the placement strategy fails to find a hole for a block, then compact blocks toward address 0, starting with the block closest to address 0 and stopping once enough space has been created to place the new block. Assume that it takes 1 microsecond to load/move a word.
load word 6144 into register 0 push register 0 onto the stack call a procedure at 5120, pushing the return address onto the stack subtract the immediate constant 16 from the stack pointer compare the actual parameter to the immediate constant 4 jump if equal to 5152You'll need to make appropriate, valid assumptions. Don't forget to state them.