Ganpat University U. V. Patel College of Engineering B. Tech. Semester - Iv (Ce/It) 2ceit401: Operating System - Assignment-2

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

GANPAT UNIVERSITY

U. V. PATEL COLLEGE OF ENGINEERING


B. TECH. SEMESTER – IV (CE/IT)
2CEIT401: OPERATING SYSTEM – ASSIGNMENT-2

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.
2. Recall that Belady's anomaly is that the page-fault rate may increase as the number
of allocated frames increases. Now, consider the followingstatements:

S1: Random page replacement algorithm (where a page chosen at random is


replaced) suffers from Belady's anomaly

S2: LUR page replacement algorithm suffers from Belady's anomaly

Which of the following is CORRECT?

A. S1 is true, S2 is true

B. S1 is true , S2 is false

C. S1 is false, S2 is true
D. S1 is false, S2 is false

3. Consider a computer system with ten physical page frames. The system is
provided with an access sequence (a1,a2,...,a20,a1,a2,...,a20), where each ai is a
distinct virtual page number. The difference in the number of page faults between
the last-in-first-out page replacement policy and the optimal page replacement
policy is __________.

4. In which one of the following page replacement algorithms it is possible for the
page fault rate to increase even when the number of allocated frames increases?

A. LRU (Least Recently Used)


B. OPT (Optimal Page Replacement)
C. MRU (Most Recently Used)
D. FIFO (First In First Out)

5. Consider a main memory with five page frames and the following sequence of
page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following

By: PDS Page 1


is true with respect to page replacement policies First In First Out(FIFO) and Least
Recently Used(LRU)?
A. Both incur the same number of page faults.
B. FIFO incurs 2 more page faults than LRU
C. LRU incurs 2 more page faults than FIFO
D. FIFO incurs 1 more page faults than LRU

6. A computer system implements a 40-bit virtual address, page size of 8 kilobytes,


and a 128-entry translation look-aside buffer (TLB) organized into 32 sets each
having four ways. Assume that the TLB tag does not store any process id. The
minimum length of the TLB tag in bits is _______.

7. A computer system implements 8 kilobyte pages and a 32-bit physical address


space. Each page table entry contains a valid bit, a dirty bit, three permission bits,
and the translation. If the maximum size of the page table of a process is 24
magabytes, the length of the virtual address supported by the system is _______
bits.

8. 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__________.

9. A computer has twenty physical page frames which contain pages numbered 101
through 120. Now a program accesses the pages numbered 1, 2, …, 100 in that
order, and repeats the access sequence THRICE. Which one of the following page
replacement policies experiences the same number of page faults as the optimal
page replacement policy for this program?
A. Least-recently-used
B. First-in-first-out
C. Last-in-first-out
D. Most-recently-used

10. A system uses 3 page frames for storing process pages in main memory. It uses the
Least Recently Used (LRU) page replacement policy. Assume that all the page
frames are initially empty. What is the total number of page faults that will occur
while processing the page reference string given below?
4, 7, 6, 1, 7, 6, 1, 2, 7, 2

11. Consider the virtual page reference string

1, 2, 3, 2, 4, 1, 3, 2, 4, 1

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

By: PDS Page 2


OPTIMAL denote the number of page faults under the corresponding page
replacement policy. Then

A. OPTIMAL < LRU < FIFO

B. OPTIMAL < FIFO < LRU

C. OPTIMAL = LRU

D. OPTIMAL = LRU
12. Let the page fault service time be 10 ms in a computer with average memory
access time being 20 ns. If one page fault is generated for every 10 6 memory
accesses, what is the effective access time for the memory?
A. 21 ns
B. 30 ns
C. 23 ns
D. 35 ns

By: PDS Page 3

You might also like