SESSION-2024-2025
ASSIGNMENT – 4
(CO4) SEM- 4th
Subject: Operating System
In Pursuit of Excellence
Code: BCS401
Dept. /Sec: CSE/A, B and C
1. Explain address binding. Name two differences between logical and physical
addresses.
2. Explain Dynamic relocation using a relocation register with a diagram.
3. Explain dynamic loading and dynamic linking.
4. Explain swapping with diagram. What are its advantages?
5. Draw and explain the diagram for the hardware used to provide memory protection
using limit and relocation register.
6. What is the limitation of fixed size and variable size memory partitions in
contiguous memory allocation?
7. What is paging? Why are page sizes always powers of 2?
8. Consider a logical address space of 64 pages of 1,024 words each, mapped
onto a physical memory of 32 frames.
a. How many bits are there in the logical address?
b. How many bits are there in the physical address?
9. Explain the difference between internal and external
fragmentation.
10. Given six memory partitions of 300 KB, 600 KB, 350 KB, 200 KB, 750 KB, and
125 KB (in order), how would the first-fit, best-fit, and worst-fit algorithms
place processes of size 115 KB, 500 KB, 358 KB, 200 KB, and 375 KB (in
order)? Rank the algorithms in terms of how efficiently they use memory.
11. What is the use of TLB in paging? Consider a paging system with the page
table stored in memory.
a. If a memory reference takes 50 nanoseconds, how long does a paged
memory reference take?
b. If we add TLBs, and 75 percent of all page-table references are found in
the TLBs, what is the effective memory reference time? (Assume that
finding a page-table entry in the TLBs takes 2 nanoseconds, if the entry
is present).
12. Explain various page table structures.
13. Explain segmentation with a neat diagram.
14. Consider the following page reference string:
7, 2, 3, 1, 2, 5, 3, 4, 6, 7, 7, 1, 0, 5, 4, 6, 2, 3, 0, 1.
Assuming demand paging with three frames, how many page faults would
occur for the following replacement algorithms?
LRU replacement
FIFO replacement
Optimal replacement
15. Explain thrashing. What are the causes of thrashing? What steps can be taken to
limit or prevent thrashing.
16. Explain the working set model and page fault frequency methods to control
thrashing.