0% found this document useful (0 votes)
92 views7 pages

qb3 AIDS

AI&DS question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views7 pages

qb3 AIDS

AI&DS question bank
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND DATA SCIENCE

QUESTION BANK
YEAR/SEM : II / IV
NAME OF THE SUBJECT : AL3452–Operating Systems
NAME OF THE FACULTY : Mrs V. Kalaiselvi AP/AI&DS

UNIT III MEMORY MANAGEMENT 10


Main Memory - Swapping - Contiguous Memory Allocation – Paging - Structure of the
Page Table - Segmentation, Segmentation with paging; Virtual Memory - Demand
Paging – Copy on Write - Page Replacement - Allocation of Frames –Thrashing.

PART A
1. Define Main memory? (K1)
2. What is address binding? (K1)
3. What is the main function of the memory-management unit? (K1)
4. Define logical address space and physical address space. (K1)
5. Define dynamic loading. (K1)
6. Define dynamic linking. (K1)
7. Define Contiguous Memory Allocation. (K1)
8. What do you mean by First Fit? (K1)
9. What do you mean by Best Fit? (K1)
10. What do you mean by Worst Fit? (K1)
11. Given memory partitions of 100KB,500Kb,200Kb,300KB and 600 KB (in order), How
would each of the first fit, best fit, worst fit algorithms place process of 212 KB,417
KB,112KB and 426KB (in order). (K6)
12. Difference between internal and external fragmentation. (K4)
13. what is meant by External Fragmentation? How can that be overcome? (K1)
14. Why are page sizes always powers of 2? (K2)
15. Name two differences between logical and physical addresses with an example.
16. Consider a logical address space of eight pages of 1024 words each, mapped onto a
physical memory of 32 frames. (K6)
a. How many bits are there in the logical address?
b. How many bits are there in the physical address?
17. Consider a logical address space of 2,048 pages with a 4-KB page size, mapped onto a
physical memory of 512 frames. (K6)
a. How many bits are required in the logical address?
b. How many bits are required in the physical address?
18. What is the use of Valid-Invalid Bits in Paging? (K1)
19. What is the basic method of Segmentation? (K1)
20. What you mean by compaction? In which situation is it applied. (K1)
21. What is the purpose of paging the page tables?
22. Define Pages and Frames. (K1)
23. Define TLB. (K1)
24. Define swapping. (K1)
25. What are overlays? Compare swapping and overlays. (K1)
26. Define effective access time. (K1)
27. List and define the common Techniques for Structuring the page table. (K1)
28. Compare and Contrast Paging and Segmentation. (K6)
29. What is virtual memory? Mention its advantages. (K1)
30. Define Demand paging and write advantages. (K1)
31. What is thrashing? (K1) (Nov-2023)
32. How do you limit the effects of thrashing? (K2)
33. What do mean by page fault? (K1)
34. Define Pre paging. (K1)
35. Write the difference between demands paging and pure demand paging? (K4)
36. Define Copy-on-write. (K1)
37. Define lazy swapper. (K1)
38. What is the basic approach of page replacement? (K1)
39. What is the various page replacement algorithms used for page replacement? (K1)
40. Differentiate between Global and Local page replacement algorithms. (K4)
41. What are the major problems to implement demand paging? (K1)
42. What is a reference string? (K1)
43. How do you limit the effects of thrashing? (K2)
44. Define demand paging in memory management. (K1)
45. What are the steps required to handle a page fault in demand paging. (K1)
46. How does the system detect thrashing? (K2)
47. Will optimal page replacement algorithm suffer from Belady’s anomaly? Justify your
answer. (K6)
48. Write about swapping. Let us assume the user process is of size 1MB and the backing
store is a standard hard disk with a transfer rate of 5MBPS. Calculate the transfer rate.
(K1)(K4)
49. Consider the following page-reference string: (K6)
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12. How many page faults and page fault ratio would occur
for the FIFO page replacement algorithm?
50. What is the counting-based page replacement algorithm? (K1)
51. Define: Belady’s anomaly? (K1)
52. What are the common strategies to select a free hole from a set of available holes?(K1)
53. What is meant by NUMA? (K1)
54. Distinguish between page and segment. (K4)
55. List the need of inverted page table. (K1)
56. What do you mean by pure demand paging? (K1)
57. What is the Working-set Model? (K1)
58. Assuming a 1-KB page size, what are the page numbers and offsets for the following
address references (provided as decimal numbers)?(K4)
a. 21205
b. 164250
c. 121357
d. 16479315
e. 27253187
59. Assuming a 1-KB page size, what are the page numbers and offsets for the following
address references (provided as decimal numbers): (K4)
a. 3085
b. 42095
c. 215201
d. 650000
e. 2000001
60. Brief on the causes of Thrashing. (K1)

PART B & PART C


1. Explain the concept of main memory with neat diagram? (K1)
2. Explain about Swapping with an example? (K1)
3. Explain about processes involved in contiguous memory allocation with a neat diagram. (K1)
4. What is Paging? Elaborate Paging with an example and neat diagram. (K2)
5. Given six memory partitions of 100 MB, 170 MB, 40 MB, 205 MB, 300 MB, and 185 MB (in
order), how would the first-fit, best-fit, and worst-fit algorithms place processes of size 200
MB, 15 MB, 185 MB, 75 MB, 175 MB, and 80 MB (in order)? Indicate which — if any —
requests cannot be satisfied. Comment on how efficiently each of the algorithms manages
memory. (K6)
6. Given memory partitions of 100KB, 500KB, 200KB, 300KB and 600KB (in order), how
would each of the first-fit, best-fit and worst-fit algorithms place processes of212KB, 417KB,
12KB and 426KB (in order)? Which algorithm makes the most efficient use of memory? (K6)
7. Given memory partitions of 300KB, 600KB, 350KB, 200KB,750KB and 125KB (in order),
how would each of the first-fit, best-fit and worst-fit algorithms place processes of 115KB,
500KB, 358KB,200KB and 375KB (in order)? Which algorithm makes the most efficient use
of memory? (K6)
8. Explain any 2 techniques used for structuring the page table. (K1)
9. Explain in detail the segmentation scheme of memory management with neat sketch. Discuss
how it is different from paging scheme? (K1)
10. i)Explain optimal, LRU, LRU approximation page replacement for the reference string
70120304230321201701
ii)Explain inverted page table. (K2)
iii)Explain Thrashing. (K2)
11. Illustrate how pages are loaded into memory using Demand Paging. (K2)
12. What is copy-on write feature and under what circumstances it is beneficial? What hardware
support is needed to implement this feature? (K1)
13. Explain the need and concept of paging technique in memory management. (K1)
14. 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, and seven frames? Remember that all frames are initially
empty, so your first unique pages will cost one fault each. (K4)
• LRU replacement
• FIFO replacement
• Optimal replacement
15. 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? (K4)
• LRU replacement
• FIFO replacement
• Optimal replacement
16. Apply the (1) FIFO, (2) LRU, and (3) optimal (OPT) replacement algorithms for the
following page-reference strings:
• 2, 6, 9, 2, 4, 2, 1, 7, 3, 0, 5, 2, 1, 2, 9, 5, 7, 3, 8, 5
• 0, 6, 3, 0, 2, 6, 3, 5, 2, 4, 1, 3, 0, 6, 1, 4, 2, 3, 5, 7
• 3, 1, 4, 2, 5, 4, 1, 3, 5, 2, 0, 1, 1, 0, 2, 3, 4, 5, 0, 1
• 4, 2, 1, 7, 9, 8, 3, 5, 2, 6, 8, 1, 0, 7, 2, 4, 1, 3, 5, 8
• 0, 1, 2, 3, 4, 4, 3, 2, 1, 0, 0, 1, 2, 3, 4, 4, 3, 2, 1, 0
Indicate the number of page faults for each algorithm assuming demand
paging with three frames. (K4)
17. Consider the following page reference string:
2,3,4,5,3,2,6,7,3,2,3,4,1,7,1,4,3,2,3,4,7
Assuming demand paging with three frames, how many page faults would occur for the
following replacement algorithms? (K4)
• LRU replacement
• FIFO replacement
• Optimal replacement
17. How many page faults occur for all page replacement algorithms for the following reference
string with four-page frames? (K4)
1, 2, 3, 4, 5, 3, 4, 1, 6, 7, 8, 7, 8, 9, 7, 8, 9, 5, 4, 5, 4, 2.
18. Consider the following page reference string:1 2 3 4 1 3 0 1 2 4 1 and 3 page frames. Find the
page faults, hit ratio and miss ratio using FIFO, optimal page replacement and LRU schemes.
(Nov-2023) (K4)
19. Explain first-in,first-out page replacement algorithm and optimal page replacement algorithm
with an example and diagrams. (K2)

20. i)Consider the following segment table: (K4)


Segment 0 1 2 3 4
Base 219 2300 90 1327 1952
Length 600 14 100 580 96
What are the Physical addresses for the following Logical addresses?
0,430 1,10 2,500 3,400 4,112
ii)Consider the following Segmentation table: (K4)
Segment Base Length
0 319 500
1 135 14
2 180 86
3 827 380
4 552 200
What are the Physical addresses for the following Logical addresses?
i. 0,241
ii. 1,18
iii. 2,71
iv. 3,210
v. 4,728
21. What is thrashing and explain the methods to avoid thrash.(K2)
22. Describe the hierarchical paging technique for structuring page tables.(K2)
23. What is the cause for thrashing? How does the system detect thrashing? Once it detects, what
can the system do to eliminate this problem?(K1)
24. Explain how paging supports virtual memory. With a neat diagram explain how logical
address is translated into physical address. (K2)
25. Explain any four page replacement algorithms in detail? Write short notes on LRU, FIFO
and clock replacement strategies? (K2)
26. Consider the following page reference string:
2, 1, 0, 3, 4, 0, 0, 0, 2, 4, 2, 1, 0, 3, 2.
How many page faults would occur if the working set policy were used with a window
size of 4? Show when each page fault would occur clearly. (K4)
27. Why are translation look-aside buffers important? Explain the details stored in a TLB
table entry? (K1) (K2)
28. Explain about Allocation of Frames in memory management? (K2)
29. Write short notes about virtual memory management and thrash ing.(K2)
27.Consider the following page reference string: 1,2,3,4,2,1,5,6,1,2,3,7,6,3,2,1,2,3,6.
How many page faults would occur for the LRU, FIFO, LFU and optimal page replacement
algorithms, assuming two and five frames? (K4)
30.Explain the concept of demand paging and the issue of demand paging? (K2)
31.Consider the following page reference string:
1,2,3,2,5,6,3,4,6,3,7,3,1,5,3,6,3,4,2,4,3,4,5,1
Indicate page faults and calculate total number of page faults and successful ratio for FIFO,
optimal and LRU algorithms. Assume there are four frames and initially all the frames are
empty. (K4)
32. Consider the following scenario. There are 4 segments in a program of sizes, A0=400B,
A1=100B, A2=21B and A3=365B. Assume that the main memory address ranges from 0 to 1999,
among which the following are the available free slots:50-350, 450-500,670-1060 and 1200-1850.
Answer the followings:

i) Provide diagrammatic representation of logical memory to physical memory.


ii) Provide segment map table and draw a suitable memory management unit.
iii) Find out internal, external and total fragmentation.
iv) List the segments of following physical addresses: 1050,560,78,2000. (K4)

Prepared by Verified by Approved by


Mrs V.Kalaiselvi , AP / AI&DS Dr.S.Balaji Dr.U.V.Arivazhagu
HOD / CSE Principal

You might also like