PART – B (16 MARKS)
.
1. Explain about contiguous memory allocation.
2. Give the basic concepts about paging.
3. Explain about the techniques for structuring the page table.
4. Explain the basic concepts of segmentation
5. Consider the following snapshot of a system:
Process Allocation Max Available
A B C D A B C D A B C D
P0 0 0 1 2 0 0 1 2 1 5 2 0
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6
Answer the following questions using the banker’s algorithm:
a. What is the content of the matrix Need? Is the system in a safe state? (8)
b. If a request from process P1 arrives for (0, 4, 2, 0), can the request be granted
immediately? (8)
6. Explain the various page replacement strategies.
7. Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for the following replacement algorithms, assuming
one, two, three, four, five, six, or seven frames? Remember all frames are initially
empty, so your first unique pages will all cost one fault each.
LRU replacement
FIFO replacement
Optimal replacement
8. A page-replacement algorithm should minimize the number of page faults. We can
do this minimization by distributing heavily used pages evenly over all of memory, rather
than having them compete for a small number of page frames. We can associate with
each page frame a counter of the number of pages that are associated with that frame.
Then, to replace a page, we search for the page frame with the smallest counter.
a. Define a page-replacement algorithm using this basic idea. Specifically
address the problems of (1) what the initial value of the counters is, (2) when counters
are increased, (3) when counters are decreased, and (4) how the page to be replaced is
selected. (8)
b. How many page faults occur for your algorithm for the following reference
string, for four page frames?
1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. (4)
c. What is the minimum number of page faults for an optimal page-replacement
strategy for the reference string in part b with four page frames? (4)
9. Explain Memory Management in LINUX
.
1. Explain about contiguous memory allocation.
2. Give the basic concepts about paging.
3. Explain about the techniques for structuring the page table.
4. Explain the basic concepts of segmentation
5. Consider the following snapshot of a system:
Process Allocation Max Available
A B C D A B C D A B C D
P0 0 0 1 2 0 0 1 2 1 5 2 0
P1 1 0 0 0 1 7 5 0
P2 1 3 5 4 2 3 5 6
P3 0 6 3 2 0 6 5 2
P4 0 0 1 4 0 6 5 6
Answer the following questions using the banker’s algorithm:
a. What is the content of the matrix Need? Is the system in a safe state? (8)
b. If a request from process P1 arrives for (0, 4, 2, 0), can the request be granted
immediately? (8)
6. Explain the various page replacement strategies.
7. Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7, 6, 3, 2, 1, 2, 3, 6.
How many page faults would occur for the following replacement algorithms, assuming
one, two, three, four, five, six, or seven frames? Remember all frames are initially
empty, so your first unique pages will all cost one fault each.
LRU replacement
FIFO replacement
Optimal replacement
8. A page-replacement algorithm should minimize the number of page faults. We can
do this minimization by distributing heavily used pages evenly over all of memory, rather
than having them compete for a small number of page frames. We can associate with
each page frame a counter of the number of pages that are associated with that frame.
Then, to replace a page, we search for the page frame with the smallest counter.
a. Define a page-replacement algorithm using this basic idea. Specifically
address the problems of (1) what the initial value of the counters is, (2) when counters
are increased, (3) when counters are decreased, and (4) how the page to be replaced is
selected. (8)
b. How many page faults occur for your algorithm for the following reference
string, for four page frames?
1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2. (4)
c. What is the minimum number of page faults for an optimal page-replacement
strategy for the reference string in part b with four page frames? (4)
9. Explain Memory Management in LINUX
No comments:
Post a Comment