Unit 3


Main Memory-Contiguous Memory Allocation, Segmentation, Paging, 32 and 64 bit architecture Examples; Virtual Memory- Demand Paging, Page Replacement, Allocation, Thrashing; Allocating Kernel Memory, OS Examples.

Part A

# Question
1 Mention two differences Differentiate between logical and physical addresses.
2 Differentiate between page and segment.
3 How the problem of external fragmentation can be solved?
4 What is a working set model?
5 Inmemorymanagementconsidertheprogramnamedas Stack1 which size is 100 KB. This program is loaded in the main memory from 2100 to 2200KB.Prepare the contents of the page map table for the given scenario.
6 What do you mean by page fault?
7 If a system supports 16 bit address line and 1K page size, what is the maximum number of pages?
8 What are overlays? What is the use of it?
9 What is virtual memory? Mention its advantages
10 What is meant by address binding? Mention the different
11 tWypheast. are advantages of dynamic linking and loading?
12 What is the cause of thrashing? How does the system detect thrashing?
13 Is it possible for a process to have two working sets, one representing data and another representing code?
14 What do you mean by compaction? In which situation is it applied?
15 Tabulate the differentiation demand paging and swapping.
16 What is meant by prepaging? Is it better than demand paging?
17 Define TLB.
18 Define demand paging in memory management. Point out the steps required to handle a page fault in demand paging?
19 Which criteria do you consider to Evaluating various page replacement algorithms to select the best one?
20 Contrast global vs. local page replacement techniques.

Part B

# Question
1 (i)Consider the following page reference string: 1, 2, 3, 4, 5, 3,4,1,6,7,8,7, 8, 9, 7, 8, 9, 5, 4, 4, 5, 3 How many page faults wouldoccurforthefollowingreplacementalgorithms, assuming four frames? Remembering all frames are initially empty. i) LRU replacement ii) FIFO replacement iii) Optimal replacement .(9) (ii) What are the advantages and disadvantages of contiguous and non-contiguous memory allocation (4)
2 (i)With a neat sketch, explain how logical address is translated into physical address using Paging mechanism. (7) (ii)Write short notes on memory-mapped files (6)
3 (i)Illustrate contiguous memory allocation schemes, give examples. (7) (ii)List the various operating systems examples (6)
4 (i)Elaborate on inverted page tables and their use in paging and segmentation. (7) (i)Give in detail about segmentation and implementation of Segment tables. (6)
5 What is demand paging? Describe the process of demand paging in OS . (13)
6 Given that main memory composed of three page frames for public use and that a program request pages in the following order A, B, A, C, D, A, B, D, B, A, C, A, C, D Using FIFO and LRU page removal algorithms do a page trace analysis and compute their page faults and success .(13)
7 Given memory partitions of 500 KB, 100 KB, 300 KB, 200 KB and 600 KB in order, how would each of the first-fit, best- fit, and worst-fit algorithms place processes of size 418 KB, 202 KB, 506 KB,11 2 KB, and 95 KB (in order)? Which the algorithms makes the most efficient use of memory? (7) (ii) Differentiate external fragmentation with internal fragmentation.(6)
8 Describe the various techniques for structuring the page table in a page memory management scheme . (13)
9 a)Explain in detail about thrashing . (7) b)Explain in detail about allocation of kernel memory (6)
10 Demonstrate with a neat sketch about segmentation and paging. (13).
11 (i)Under what circumstances do page faults occur? Explain the actions taken by the operating system when a page fault occurs(7) (ii)Analyze situations in which the least frequently used (LFU) page replacement algorithm generates fewer page fault than the least recently used page replacement algorithm. Also Discuss under what circumstances the opposite holds good.(6)
12 (i)Examine a mechanism by which one segment could belong to the address space of two different processes.(or)Examine a mechanism of virtual memory.(7) (ii)Why are segmentation and paging sometimes combined into one scheme?Explain them in detail with example.(6)
13 Discuss the given memory management techniques with diagrams (i)Partition allocation methods (7) (ii)Paging and translation Look-aside buffer.(6)
14 (i)Describe in detail about allocation of frames. (8) (ii)Explain the belady´┐Żs anomalous problem of FIFO. (5)