Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Tests  >  Operating System  >  Test: Memory Management- 1 - Computer Science Engineering (CSE) MCQ

Test: Memory Management- 1 - Computer Science Engineering (CSE) MCQ


Test Description

15 Questions MCQ Test Operating System - Test: Memory Management- 1

Test: Memory Management- 1 for Computer Science Engineering (CSE) 2024 is part of Operating System preparation. The Test: Memory Management- 1 questions and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus.The Test: Memory Management- 1 MCQs are made for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, notes, meanings, examples, exercises, MCQs and online tests for Test: Memory Management- 1 below.
Solutions of Test: Memory Management- 1 questions in English are available as part of our Operating System for Computer Science Engineering (CSE) & Test: Memory Management- 1 solutions in Hindi for Operating System course. Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free. Attempt Test: Memory Management- 1 | 15 questions in 35 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study Operating System for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
Test: Memory Management- 1 - Question 1

What is the swap space in the disk used for?

Detailed Solution for Test: Memory Management- 1 - Question 1

Swap space is typically used to store process data

Test: Memory Management- 1 - Question 2

Which of the following page replacement algorithms suffers from Belady’s anomaly?

Detailed Solution for Test: Memory Management- 1 - Question 2

Belady’s anomaly proves that it is possible to have more page faults when increasing the number of page frames while using the First in First Out (FIFO) page replacement algorithm.

1 Crore+ students have signed up on EduRev. Have you? Download the App
Test: Memory Management- 1 - Question 3

A computer system supports 32-bit virtual addresses as well as 32-bit physical addresses. Since the virtual address space is of the same size as the physical address space, the operating system designers decide to get rid of the virtual memory entirely. Which one of the following is true?

Detailed Solution for Test: Memory Management- 1 - Question 3

For supporting virtual memory, special hardware support is needed from Memory Management Unit. Since operating system designers decide to get rid of the virtual memory entirely, hardware support for memory management is no longer needed

Test: Memory Management- 1 - Question 4

Increasing the RAM of a computer typically improves performance because:

Detailed Solution for Test: Memory Management- 1 - Question 4

When there is more RAM, there would be more mapped virtual pages in physical memory, hence fewer page faults. A page fault causes performance degradation as the page has to be loaded from secondary device.

Test: Memory Management- 1 - Question 5

Virtual memory is

Detailed Solution for Test: Memory Management- 1 - Question 5

Virtual memory is illusion of large main memory.

Test: Memory Management- 1 - Question 6

A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is:

Detailed Solution for Test: Memory Management- 1 - Question 6

Size of a page = 4KB = 2^12 Total number of bits needed to address a page frame = 32 – 12 = 20 If there are ‘n’ cache lines in a set, the cache placement is called n-way set associative. Since TLB is 4 way set associative and can hold total 128 (2^7) page table entries, number of sets in cache = 2^7/4 = 2^5. So 5 bits are needed to address a set, and 15 (20 – 5) bits are needed for tag.

Test: Memory Management- 1 - Question 7

Thrashing occurs when

Detailed Solution for Test: Memory Management- 1 - Question 7

Thrashing occurs processes on system require more memory than it has. If processes do not have “enough” pages, the pagefault rate is very high. This leads to: – low CPU utilization – operating system spends most of its time swapping to disk The above situation is called thrashing

Test: Memory Management- 1 - Question 8

A computer 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), which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2). Each entry of T2 stores the base address of a page of the third-level table (T3). Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16-way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes.
What is the minimum number of page colours needed to guarantee that no two synonyms map to different sets in the processor cache of this computer?

Detailed Solution for Test: Memory Management- 1 - Question 8

1 MB 16-way set associative virtually indexed physically tagged cache(VIPT). 
The cache block size is 64 bytes.

No of blocks is 2^20/2^6 = 2^14.

No of sets is 2^14/2^4 = 2^10.

VA(46)
+-------------------------------+
tag(30) , Set(10) , block offset(6)
+-------------------------------+

In VIPT if the no. of bits of page offset =  (Set+block offset) then only one page color is sufficient. but we need 8 colors because the number bits where the cache set index and  physical page number over lap is 3 so 2^3 page colors is required.(option 
c is ans). 

Test: Memory Management- 1 - Question 9

Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every 10^6 memory accesses, what is the effective access time for the memory?

Detailed Solution for Test: Memory Management- 1 - Question 9


= 30 ns 

Test: Memory Management- 1 - Question 10

In which one of the following page replacement policies, Belady’s anomaly may occur?

Detailed Solution for Test: Memory Management- 1 - Question 10

Belady’s anomaly proves that it is possible to have more page faults when increasing the number of page frames while using the First in First Out (FIFO) page replacement algorithm. 

Test: Memory Management- 1 - Question 11

The essential content(s) in each entry of a page table is / are

Detailed Solution for Test: Memory Management- 1 - Question 11

A page table entry must contain Page frame number. Virtual page number is typically used as index in page table to get the corresponding page frame number.

Test: Memory Management- 1 - Question 12

A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements:

P: Increasing the number of page frames allocated to a 
   process sometimes increases the page fault rate.
Q: Some programs do not exhibit locality of reference. 
Which one of the following is TRUE?

Detailed Solution for Test: Memory Management- 1 - Question 12

First In First Out Page Replacement Algorithms: This is the simplest page replacement algorithm. In this algorithm, operating system keeps track of all pages in the memory in a queue, oldest page is in the front of the queue. When a page needs to be replaced page in the front of the queue is selected for removal. FIFO Page replacement algorithms suffers from Belady’s anomaly : Belady’s anomaly states that it is possible to have more page faults when increasing the number of page frames.

Solution: Statement P: Increasing the number of page frames allocated to a process sometimes increases the page fault rate. Correct, as FIFO page replacement algorithm suffers from belady’s anomaly which states above statement.

Statement Q: Some programs do not exhibit locality of reference. Correct, Locality often occurs because code contains loops that tend to reference arrays or other data structures by indices. So we can write a program does not contain loop and do not exhibit locality of reference. So, both statement P and Q are correct but Q is not the reason for P as Belady’s Anomaly occurs for some specific patterns of page references.

Test: Memory Management- 1 - Question 13

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?

Detailed Solution for Test: Memory Management- 1 - Question 13

LRU replacement policy: The page that is least recently used is being Replaced. Given String: 1, 2, 1, 3, 7, 4, 5, 6, 3, 1 123  // 1 ,2, 3 //page faults 173→7 473→4 453→5 456→6 356→3 316 →1 Total 9 In optimal Replacement total page faults=7 Therefore 2 more page faults  Answer is C

Test: Memory Management- 1 - Question 14

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?

Detailed Solution for Test: Memory Management- 1 - Question 14

The optimal page replacement algorithm swaps out the page whose next use will occur farthest in the future. In the given question, the computer has 20 page frames and initially page frames are filled with pages numbered from 101 to 120. Then program accesses the pages numbered 1, 2, …, 100 in that order, and repeats the access sequence THRICE. The first 20 accesses to pages from 1 to 20 would definitely cause page fault. When 21st is accessed, there is another page fault. The page swapped out would be 20 because 20 is going to be accessed farthest in future. When 22nd is accessed, 21st is going to go out as it is going to be the farthest in future. The above optimal page replacement algorithm actually works as most recently used in this case. Iteration 1: (1-100) Not present - all replaced 1-20 in 20 frames, 21-100 in 20th frame. hence, page faults = 100 Iteration 2: (1-19) present | (20-99) NOT present | (100) present - the replacements are done at the 19th frame hence, page faults = 100 - 19 - 1 = 80 Iteration 3: (1-18) present | (19-98) NOT present | (99-100) present - the replacements are done at the 18th frame hence page faults = 100 - 18 - 2 = 80 Iteration 4: (1-17) present | (17-97) NOT present | (98-100) present - the replacements are done at the 17th frame hence page faults = 100 - 17 - 3 = 80 Total page faults = 100 + 80 + 80 +80 = 340 Along with generating same number of page faults M.R.U also generates replacements at the same positions as in the Optimal algorithm.(Assuming the given 101-120 pages are INVALID (not belonging to the same process) or Empty). While the LIFO replacement does not behave like Optimal replacement algorithm as it generates 343 page faults. Because from 21st page all pages are placed in 20th frame, therefore hits per iteration reduces down to 19 from the 2nd iteration of pages. Whereby Total Page faults = 100 + 81 + 81 + 81 = 343

Test: Memory Management- 1 - Question 15

A CPU generates 32-bit virtual addresses. The page size is 4 KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is:

Detailed Solution for Test: Memory Management- 1 - Question 15

Virtual Memory would not be very effective if every memory address had to be translated by looking up the associated physical page in memory. The solution is to cache the recent translations in a Translation Lookaside Buffer (TLB). A TLB has a fixed number of slots that contain page table entries, which map virtual addresses to physical addresses.

Solution : Size of a page = 4KB = 2^12 means 12 offset bits CPU generates 32-bit virtual addresses Total number of bits needed to address a page frame = 32 – 12 = 20 If there are ‘n’ cache lines in a set, the cache placement is called n-way set associative. Since TLB is 4 way set associative and can hold total 128 (2^7) page table entries, number of sets in cache = 2^7/4 = 2^5. So 5 bits are needed to address a set, and 15 (20 – 5) bits are needed for tag. Option (C) is the correct answer.

10 videos|99 docs|33 tests
Information about Test: Memory Management- 1 Page
In this test you can find the Exam questions for Test: Memory Management- 1 solved & explained in the simplest way possible. Besides giving Questions and answers for Test: Memory Management- 1, EduRev gives you an ample number of Online tests for practice

Top Courses for Computer Science Engineering (CSE)

10 videos|99 docs|33 tests
Download as PDF

Top Courses for Computer Science Engineering (CSE)