Assignment
Assignment
1. Define virtual memory and explain demand paging with a neat diagram.
2. Consider the following page reference string:
1, 2, 3, 4, 2, 1, 5, 6, 2, 1, 2, 3, 7
Assume a frame size of 4 pages.
(a) Calculate the number of page faults using the FIFO algorithm.
(b) Repeat using the LRU algorithm.
(c) Which performs better here and why?
3. A system has a TLB hit time of 15 ns and a main memory access time of 100 ns.
If the TLB hit ratio is 90%, calculate the effective memory access time.
4. A system uses a 36-bit virtual address and a page size of 4 KB. Each page table
entry takes 6 bytes.
(a) How many pages does the virtual address space have?
(b) What is the total size of the page table?
6. Explain the concept of thrashing in virtual memory systems. How does a high
degree of multiprogramming contribute to thrashing?
7. A file system stores metadata as follows:
• Name: 32 bytes
• Type, Owner, Permissions: 20 bytes
• Timestamps (created, modified, accessed): 24 bytes