0% found this document useful (0 votes)
41 views3 pages

Memory Questions

Uploaded by

samra.mehar009
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)
41 views3 pages

Memory Questions

Uploaded by

samra.mehar009
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

Operating Systems – Fall 2025

Memory Management
Q 1) Consider the requests from processes in given order 300K, 25K, 125K and 50K. Let there be
two blocks of memory available of size 150K followed by a block size 350K. Which of the
following partition allocation schemes can satisfy above requests?
a) First fit
b) Worst fit

Q 2) Given five memory partitions of 100 KB, 00 KB, 200 KB, 300 KB, and 600 KB (in order),
how would the first-fit, best-fit, and worst-fit algorithms place processes of 212 KB, 417 KB, 112
KB, and 426 KB (in order)? Which algorithm makes the most efficient use of memory?

Q 3) Assuming a 1-KB page size, what are the page numbers and offsets for the following address
references (provided as decimal numbers):
a. 2375
b. 19366
c. 30000
d. 256
e. 16385

Q 4) What is the effect of allowing two entries in a page table to point to the same page frame in
the memory? Explain how this effect could be used to decrease the amount of time needed to copy
a large amount of memory from one place to another. What effect would updating some byte on
the one page have on the other page?

Q 5) Consider a computer system with a 32-bit logical address and 4-KB page size. The system
sup0ports up to 512 MB of physical memory. How many entries are there in page table?

Q 6) The following table shows the first 8 entries in the page map. If there are 1024 (210) bytes per
page, what is the physical address corresponding to the decimal virtual address 4012?

page # Valid bit Frame #


0 0 7
1 1 9
2 0 3
3 1 2
4 1 5
5 0 5
6 0 4
7 1 1
If the physical memory size (in bytes) is 32k. In a new configuration, it becomes 64K (doubled).
a) Will the number of entries in the page table will change? Describe reasons.
b) How does the size of single entry of page table will change?

Q 7) If the frame size (in bytes) is increased to four times the previous one, how does the size of
page table will change?

Q 8) Consider the system having four frames in memory. Initially pages 1,2,3 and 4 are loaded.
Compare the performance of LRU and FIFO page replacement algorithms if the page excess
sequence is 3, 4, 5, 6, 7, 6, 5, 4, 3, 4, 5, 6, 7, 6. Count the number of hits (hit means when required
page is already in memory) for each algorithm. Also write miss-rate.

Q 9) Consider a user program of logical address of size 6 pages and page size is 4 bytes. The
physical address contains 300 frames. The user program consists of 22 instructions a, b, c, . . . u,
v . Each instruction takes 1 byte. Assume at that time the free frames are 7, 26, 52, 20, 55, 6, 18,
21, 70, and 90. Find the following?

A) Draw the logical and physical maps and page table?


B) Allocate each page in the corresponding frame?
C) Find the physical addresses for the instructions f,,n,,t,u?
D) Calculate the fragmentation if exist?

Q 10) Consider the following page reference using three frames that are initially empty. Find the
page faults using LRU algorithm and compare it with optimal page-replacement strategy, where
the page reference sequence is: 7,0,1, 2,0,3,0,4,2,3,0,3,2,1,2,0,1,7,0,1?

Q 11) Here we consider a tiny computing system that supports up to 1KB physical memory, and
with 12-bit virtual addresses (4096 bytes). Suppose that the size of a virtual page and a physical
frame is 128 bytes (i.e., with 7 address bits representing page offset). Prior to beginning your
implementation, please think carefully about the following questions.
(a) What is the maximum number of virtual pages for each process?
(b) How many physical pages (or frames) can be supported in total?
(c) How many entries are in the page table for each process?

Q 12) 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?
c. How many bits needed for offset?

Q 13) A certain computer provides its users with a virtual memory space of 232 bytes. The computer
has 218 bytes of physical memory. The virtual memory is implemented by paging, and the page size is
4,096 bytes. A user process generates the virtual address 11123456. Explain how the system establishes
the corresponding physical location.

Q 14) Consider the page table for a system with 12-bit virtual and physical addresses with 256-byte
pages. The list of free page frames is D, E, F (that is, D is at the head of the list, E is second, and F is
last).

Page # Frame # (Hex numbers)


0 -
1 2
2 -
3 A
4 6
5 -
6 3
7 C
8 B
9 0

Convert the following virtual addresses to their equivalent physical addresses in hexadecimal. All
numbers are given in hexadecimal. (A dash for a page frame indicates that the page is not in memory.)
• 9EF
• 111
• 700
• 0FF

You might also like