Numerical
Numerical
(a) Give a diagram showing how a virtual address would be translated to a physical address.
(b) What is the number of page table entries that can be contained in each page?
(c) How many bits are available for storing protection and other information in each page table
entry?
Answer
(b) No of entries in each page =210
(c) 12 bits.
(a) What is the minimum page size in bytes so that the page table for a segment requires at
most one page to store it? Assume that the page size can only be a power of 2.
(b) Now suppose that the pages size is 512 bytes. It is proposed to provide a TLB (Translation
look-aside buffer) for speeding up address translation. The proposed TLB will be capable of
storing page table entries for 16 recently referenced virtual pages, in a fast cache that will use
the direct mapping scheme. What is the number of tag bits that will need to be associated with
each cache entry
(c) Assume that each page table entry contains (besides other information) 1 valid bit, 3 bits
for page protection and 1 dirty bit. How many bits are available in page table entry for storing
the aging information for the page? Assume that the page size is 512 bytes.
Answer
(a) Page size =128 Bytes
(b) Tag Bits =3
(c) 7 bits
3>GATE CSE 1998
In a computer system where the ‘best-fit’ algorithm is used for allocating ‘jobs’ to ‘memory
partitions’, the following situation was encountered:
Answer
After 19 unit time 20K job will be completed
↑LRU Page
For each hexa decimal address in the address sequence given below,
00FF, 010D, 10FF, 11B0
Indicate,
i) The new status of the list
ii) Page faults, if any, and
iii) Page replacements, if any
Answer
(ii) Page fault =3
(iii) Page replacement
Answer
Solve it.
This program is run on a demand paged virtual memory system, with main memory size equal
to 4 pages. Indicate the page references for which page faults occurs for the following page
replacement algorithms.
(a) LRU
(b) FIFO
Answer
(a) 9 page fault
(b) 7 page fault.
Answer
No of page fault =4
Average page frames used =4
Answer
Correct Answer is 154.5
9>GATE CSE 2019
Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are
48 bits long. The memory is word addressable. The page size is 8 kB and the word size is 4 bytes. The
Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how
many distinct virtual addresses can be translated without any TLB miss?
16 × 210
8 × 220
4 × 220
256 × 210(Right)
Which one of the following is the correct expression for the page fault rate experienced by the
process?
Ans:-(X-M)/(D-M)
11>GATE CSE 2016 Set 1
Consider a computer system with 40-bit virtual addressing and page size of sixteen kilobytes.
If the computer system has a one-level page table per process and each page table entry
requires 48 bits, then the size of the per-process page table ____________ is megabytes.
Answer
Correct Answer is 384
12>GATE CSE 2015 Set 2
Consider six memory partitions of
sizes 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and 250 KB, where KB refers to kilobyte. These
partitions need to be allotted to four processes of sizes 357 KB, 210 KB, 468 KB and 491 KB in
that order. If the best fit algorithm is used, which partitions are NOT allotted to any process?
Answer
Correct Answer is 36
14> GATE CSE 2014 Set 1
Assume that there are 3 page frames which are initially empty. If the page reference string
is 1,2,3,4,2,1,5,3,2,4,6, the number of page faults using the optimal replacement policy
is______________.
Answer
Correct Answer is 7
15> GATE CSE 2014 Set 3
Consider a paging hardware with a TLB. Assume that the entire page table and all the pages are in the
physical memory. It takes 10 milliseconds to search the TLB and 80 milliseconds to access the
physical memory. If the TLB hit ratio is 0.6, the effective memory access time (in milliseconds)
is______________.
Answer
Correct Answer is 122
On a demand paged virtual memory system running on a computer system that has main memory size of 3 page
frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the
Ans:-OPTIMAL<FIFO<LRU
page table entry is of size 4 bytes. A three level page table is used for virtual to physical address translation,
∗ Bits 30-31 are used to index into the first level page table
∗ Bits 21-29 are used to index into the second level page table
∗ Bits 12-20 are used to index into the third level page table, and
The number of bits required for addressing the next level page table (or page frame) in the page table
entry of the first, second and third level page tables are respectively
a)20, 20 and 20
d)25, 25 and 24
17> GATE CSE 2007
A process has been allocated 3 page frames. Assume that none of the pages of the process
are available in the memory initially. The process makes the following sequence of page
references (reference string):1,2,1,3,7,4,5,6,3,1
Least Recently Used (LRU) page replacement policy is a practical approximation to optimal
page replacement. For the above reference string, how many more page faults occur with LRU
than with the optimal page replacement policy?
Ans:- 2
A process has been allocated 3 page frames. Assume that none of the pages of the process are
available in the memory initially. The process makes the following sequence of page references
(reference string):1,2,1,3,7,4,5,6,3,1
If optimal page replacement policy is used, how many page faults occur for the above
reference string?
Ans:-7
19> GATE CSE 2004
Consider a System with a two-level paging scheme in which a regular memory access takes 150 nanoseconds,
and servicing a page fault takes 8 milliseconds. An average instruction takes 100 nanoseconds of CPU time, and
two memory accesses. The TLB hit ratio is 90% and the page fault rate is one in every 10,000 instructions. What
Ans:-645 nanoseconds
20> (GATE 2013)
A laptop uses 46–bit virtual address, 32–bit physical address, and a three–level paged page table organization.
The page table base register stores the base address of the first–level table (T1), that occupies specifically one
page. every entry of T1 stores the base address of a page of the second–level table (T2). every entry of T2
stores the base address of a page of the third–level table (T3). every entry of T3 stores a page table entry (PTE).
The PTE is thirty two bits in size. The processor employed in the pc encompasses a one MB sixteen way set
associativevirtually indexed physically labeled cache. The cache block size is sixty four bytes. What is the size of
a page in KB during this computer?
A.2
B.4
C.8
D.16
21>(GATE 2013)
A system uses first in first out policy for page replacement. it’s four page frames with no pages
loaded to start with. The system initial accesses a hundred distinct pages in some
order so accesses hundred distinct pages in some order and then wants to access 100 pages
in reverse order. what number page faults can occur?
A.196
B.192
C.197
D.195
22> In a demand paging memory system, page table is held in registers. The time taken
to service a page fault is 8 m.sec. if an empty frame is available or if the replaced page is
not modified, and it takes 20 m.secs., if the replaced page is modified. What is the
average access time to service a page fault assuming that the page to be replaced is
modified 70% of the time ?
ans: 16.4 m.sec.
June 2014
Q23. In a paged memory management algorithm, the hit ratio is 70%. If it takes 30
nanoseconds to search Translation Look-aside Buffer (TLB) and 100 nanoseconds (ns) to
access memory, the effective memory access time is
ans:- 160 ns
24>>A processor user 2-level page tables for virtual to physical address translation. Page tables for both levels
are stored in the main memory. Virtual and physical adresses are both 32 bits wide. The memory is byte
addressable. For virtual to physical address translation, the 10 most significant bits of the virtual address are
used as index into the first level page table while the next 10 bits are used as index into the second level page
table. The 12 least significant bits of the virtual address are used as offset within the page. Assume that the
page table entries in both levels of page tables are 4 bytes wide. Further, the processor has a translation look-
aside buffer (TLB), with a hit rate of 96% . The TLB caches recently used virtual page numbers and the
corresponding physical page numbers. The processor also has a physically addressed cache with a hit ratio of
90 %. Main memory access time is 10 ns, cache access time is 1 ns. and TLB access time is also 1 ns.
Suppose a process has only the following pages in its virtual address space: two contiguous code pages
starting at virtual address 0 x 00000000, two contiuous data page starting at virtual address 0 x FFFFF000.
The amount of memory required for storing the page tables of this process is--
Solution