Explore topic-wise MCQs in Operating System.

This section includes 33 Mcqs, each offering curated multiple-choice questions to sharpen your Operating System knowledge and support exam preparation. Choose a topic below to get started.

1.

Consider the virtual page reference string 1, 2, 3, 2, 4, 1, 3, 2, 4, 1Let a computer system has main memory size of 3 page frames which are initially empty and it is running on demand paged virtual memory system. The number of page faults under LRU and FIFO page replacement policy are respectively:

A. 9, 6
B. 6, 3
C. 6, 9
D. 3 , 6
Answer» B. 6, 3
2.

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

A. FIFO
B. Optimal
C. LRU
D. MRU
Answer» B. Optimal
3.

A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 50 distinct pages in some order and then accesses the same 50 pages in reverse order. How many page faults will occur?

A. 96
B. 100
C. 97
D. 92
Answer» B. 100
4.

How many page faults occur in a system with LRU page replacement policy having 3 (initially empty) page frames for the following string of page reference - 5, 1, 2, 3, 4, 3, 2, 3, 1, 2, 4, 3?

A. 7
B. 8
C. 9
D. 10
Answer» C. 9
5.

Dirty bit for a page in a page table

A. Helps avoid unnecessary writes on paging device
B. Helps maintain LRU information
C. Allows only read on a page
D. None of these
Answer» B. Helps maintain LRU information
6.

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 6What are the minimum number of frames required to get a single page fault for the above sequence assuming LRU replacement strategy?

A. 7
B. 4
C. 6
D. 5
Answer» D. 5
7.

A computer has sixteen pages of virtual address space but the size of main memory is only four frames. Initially the memory is empty. A program references the virtual pages in the order of 0, 2, 4, 5, 2, 4, 3, 11, 2, 10. How many page faults occur if LRU page replacement algorithm is used?

A. 3
B. 5
C. 7
D. 8
Answer» D. 8
8.

Determine the number of page faults when references to pages occur in the following order : 1, 2, 4, 5, 2, 1, 2, 4. Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page one having brought earlier than page 2. (LRU page replacement algorithm is used)

A. 3
B. 5
C. 4
D. None of these
Answer» D. None of these
9.

A virtual memory system uses FIFO page replacement policy and allocates a fixed number of frames to the process. Consider the following statementsM : Increasing the number of page frames allocated to a process sometimes increases the page fault rateN : Some programs do not exhibit locality of referenceWhich one of the following is true?

A. Both M and N are true and N is the reason for M
B. Both M and N are true but N is not the reason for M
C. Both M and N are false
D. M is false, but N is true
Answer» C. Both M and N are false
10.

Determine the number of page faults when references to pages occur is the order – 1, 2, 4, 5, 2, 1, 2, 4. Assume that the main memory can accommodate 3 pages and the main memory already has the pages 1 and 2, with page 1 having brought earlier than page 2. (assume LRU i.e. Least-Recently-Used algorithm is applied)

A. 3
B. 4
C. 5
D. None of the above
Answer» C. 5
11.

Given reference to the following pages by a program0, 9, 0, 1, 8, 1, 8, 7, 8, 7, 1, 2, 8, 2, 7, 8, 2, 3, 8, 3How many page faults will occur if the program has three page frames available to it and uses an optimal replacement?

A. 7
B. 8
C. 9
D. None of these
Answer» B. 8
12.

Dirty bit is used to indicate which of the following ?

A. A page fault has occurred
B. A page has corrupted data
C. A page has been modified after being loaded into cache
D. An illegal access of page
Answer» D. An illegal access of page
13.

If an instruction takes i microseconds and a page fault takes an additional j microseconds, the effective instruction time if on the average a page fault occurs every k instruction is:

A. \(i +{j \over k}\)
B. \(i +{j \times k}\)
C. \({i +j \over k}\)
D. \((i + j ) \times k\)
Answer» B. \(i +{j \times k}\)
14.

______ is the phenomenon in operating system in which sometimes increasing the number of page frames, increases the number of page faults. This phenomenon is commonly experienced in _____ page replacement policy.

A. Banker's concept, FIFO
B. Dining Philosopher's Problem, LRU
C. Belady's Anomaly, FIFO
D. Gangs Phenomenon, Optimal
Answer» D. Gangs Phenomenon, Optimal
15.

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)
Answer» E.
16.

How many page faults occur in LRU page replacement algorithm for the given referencestring, with four-page frames7, 0, 1, 2, 0, 3, 4, 2, 3, 0, 3, 2, 1, 2, 0, 1

A. 6
B. 8
C. 7
D. 9
Answer» D. 9
17.

Consider a virtual page reference string 7, 0, 1, 2, 0, 3, 0, 4, 2, 3, 0, 3, 2, 1, 2, 0,1, 7, 0,1 Suppose a demand paged virtual memory system running on a computer system such that the main memory has 3 page frames. Then_______ page replacement algorithm has minimum number of page faults.

A. FIFO
B. LIFO
C. LRU
D. Optimal
Answer» E.
18.

Page fault occurs when ________.

A. The page is in main memory
B. The page is not in main memory
C. The page has an address, which cannot be loaded
D. The page is not in cache memory
Answer» C. The page has an address, which cannot be loaded
19.

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 106 memory accesses, what is the effective access time for the memory?

A. 21.4 ns
B. 29.9 ns
C. 23.5 ns
D. 35.1 ns
Answer» C. 23.5 ns
20.

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 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
Answer» B. FIFO incurs 2 more page faults than LRU
21.

Belady's anomaly may occur in ________.

A. deadlock detection
B. page replacement
C. process scheduling
D. process synchronisation
Answer» C. process scheduling
22.

Consider a system with page fault service time (S) = 100 ns, main memory access time (M) = 20 ns, and page fault rate (P) = 65%. Calculate the effective memory access time.

A. 72 ns
B. 82 ns
C. 80 ns
D. 62 ns
Answer» B. 82 ns
23.

Increasing the RAM of a computer typically improves performance because

A. Virtual memory increase
B. Larger RAMs are faster
C. Fewer page faults occur
D. Fewer segmentation fault occurs
Answer» D. Fewer segmentation fault occurs
24.

Consider a hypothetical machine with 3 pages of physical memory, 5 pages of virtual memory, and < A, B, C, D, A, B, E, A, B, C, D, E, B, A, B > as the stream of page references by an application. If P and Q are the number of page faults that the application would incur with FIFO and LRU page replacement algorithms respectively. then (P,Q) = ______. (Assuming enough space for storing 3 page frames)

A. (11, 10)
B. (12, 11)
C. (10, 11)
D. (11, 12)
Answer» E.
25.

Consider the following page reference string:1, 2, 3, 2, 4, 1, 3, 2, 4, 1Assume that there are three-page frames which are initially empty. Let LRU, FIFO, OPTIMAL denote the number of page faults under the corresponding page replacement strategy. Then, which of the following is TRUE?

A. LRU = FIFO = OPTIMAL
B. LRU = OPTIMAL
C. FIFO < OPTIMAL < LRU
D. OPTIMAL < FIFO < LRU
Answer» E.
26.

Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is available in memory, and D units if the memory access causes a page fault. It has been experimental measured that the average time taken for a memory access in the process is X units.Which one of the following is the correct expression for the page fault rate experienced by the process?

A. (D - M) / (X - M)
B. (X - M) / (D - M)
C. (D - X) / (D - M)
D. (X - M) / (D - X)
Answer» C. (D - X) / (D - M)
27.

In the demand paging memory, a page table is held in registers. If it takes 1000 ms to service a page fault and if the memory access time is 10 ms, what is the effective access time for a page fault rate of 0.01?

A. 19.9 ms
B. 10.9 ms
C. 9.99 ms
D. 0.99 ms
Answer» B. 10.9 ms
28.

THE_VALID_‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬®_INVALID_BIT,_IN_THIS_CASE,_WHEN_VALID_INDICATES_:?$#

A. the page is not legal
B. the page is illegal
C. the page is in memory
D. the page is not in memory
Answer» D. the page is not in memory
29.

When a page fault occurs, the state of the interrupted process is :$

A. disrupted
B. invalid
C. saved
D. none of the mentioned
Answer» D. none of the mentioned
30.

A page fault occurs when :$

A. a page gives inconsistent data
B. a page cannot be accessed due to its absence from memory
C. a page is invisible
D. all of the mentioned
Answer» C. a page is invisible
31.

If the memory access time is denoted by ‘ma’ and ‘p’ is the probability of a page fault (0 <= p <= 1). Then the effective access time for a demand paged memory is :$

A. p x ma + (1-p) x page fault time
B. ma + page fault time
C. (1-p) x ma + p x page fault time
D. none of the mentioned
Answer» D. none of the mentioned
32.

Using a pager ?

A. increases the swap time
B. decreases the swap time
C. decreases the swap time & amount of physical memory needed
D. increases the amount of physical memory needed
Answer» D. increases the amount of physical memory needed
33.

Error handler codes, to handle unusual errors are :

A. almost never executed
B. executed very often
C. executed periodically
D. none of the mentioned
Answer» B. executed very often