Tutorial - 3
Tutorial - 3
Semester 2 2014/2015
Tutorial 3: Memory Management (Part 2)
2. List the memory allocation scheme that required the entire job to be stored in
main memory.
3. List down the step on how to calculate the exact address of the instruction of
byte 214 in main memory when using paged memory allocation. Assume that
each page size is 100 and use the below Page Map Table (PMT) for Job 1.
Page Map table for Job 1
Job Page No
0
1
2
3
Page Frame No
8
10
5
11
4. Describe how the function of the Page Map Table (PMT) differs in paged vs.
segmented/demand paging memory allocation.
5. Demand paging allows the user to run jobs with less memory than the size of the
job. How is this possible?
6. What is the cause of thrashing?
7. What is the working set?
8. Given that main memory is composed of three page frames for public use and
that a seven-page program (with pages a, b, c, d, e, f, g) requests pages in the
following order:
a, b, a, c, d, a, e, f, g, c, b, g
a. Using the FIFO page removal algorithm, do a page trace analysis indicating
page faults with asterisks (*). Then compute the failure and success ratios.
b. Increase the size of memory so it contains four page frames for public use.
Using the same page requests as above and FIFO, do another page trace
analysis and compute the failure and success ratios.
c. Did the result correspond with your intuition? Explain.
9. Given that main memory is composed of three page frames for public use and
that a program requests pages in the following order:
a, d, b, a, f, b, e, c, g, f, b, g
a. Using the FIFO page removal algorithm, perform a page trace analysis
indicating page faults with asterisks (*). Then compute the failure and success
ratios.
b. Using the LRU page removal algorithm, perform a page trace analysis and
compute the failure and success ratios.
c. Which is better? Why do you think it is better? Can you make general
statements from this example? Why or why not?
10.Given that main memory is composed of four page frames for public use, use the
following table to answer all parts of this problem:
Page
Frame
Time When
Loaded
0
1
2
3
126
230
120
160
Time When
Last
Referenced
279
280
282
290
Referenced
bit
Modified Bit
0
1
1
1
0
0
1
1
11. Given three subroutines of 700, 200, and 500 words each, if segmentation is
used then the total memory needed is the sum of the three sizes (if all three
routines are loaded). However, if paging is used then some storage space is lost
because subroutines rarely fill the last page completely, and that results in
internal fragmentation. Determine the total amount of wasted memory due to
internal fragmentation when the three subroutines are loaded into memory using
each of the following page sizes:
a. 100 words
b. 600 words
c. 700 words
d. 900 words
12.
Memory
Location
4096
6144
9216
2048
7168
Memory
Location
2048
6144
9216