Operating System

111. Suppose that the virtual address space has eight pages and physical memory with four page frames. If LRU page replacement algorithm is used, how many page faults occur with the reference string 0 2 1 3 5 4 6 3 7 4 7 3 3 5 5 3 1 1 1 7 2 3 4 1?
मान लें virtual address space में 8 pages हैं और physical memory में 4 page frames हैं। यदि LRU page replacement algorithm उपयोग किया जाए, तो reference string 0 2 1 3 5 4 6 3 7 4 7 3 3 5 5 3 1 1 1 7 2 3 4 1 के लिए कितने page faults होंगे?
(UGC NET C.S. August-2016 (Paper-II))
A. 11
B. 12
C. 10
D. 13

Correct Answer: D

Explanation (EN): "**Question Delete Kar diya tha exam me 13 option nhi tha Ans hoga 13 page faults

Explanation (HI):

112. Five jobs A, B, C, D and E are waiting in Ready Queue. Their expected runtimes are 9, 6, 3, 5 and x respectively. All jobs entered in Ready Queue at time zero. They must run in ______ order to minimize average response time if 3 < x < 5.
पाँच jobs A, B, C, D और E Ready Queue में हैं। उनके expected runtimes क्रमशः 9, 6, 3, 5 और x हैं। सभी jobs time zero पर queue में आई हैं। यदि 3 < x < 5, तो average response time minimize करने के लिए उन्हें किस order में run होना चाहिए?
(UGC NET C.S. August-2016 (Paper-II))
A. B, A, D, E, C
B. C, E, D, B, A
C. E, D, C, B, A
D. C, B, A, E, D

Correct Answer: B

Explanation (EN): To minimize average response time, SJF order is used, giving C, E, D, B, A.

Explanation (HI): Average response time minimize करने के लिए SJF order लिया जाता है, इसलिए क्रम C, E, D, B, A होगा।

113. Consider three CPU intensive processes P1, P2, P3 which require 20, 10 and 30 units of time, arrive at times 1, 3 and 7 respectively. Suppose operating system is implementing shortest remaining time first (preemptive scheduling) algorithm, then how many context switches are required (suppose context switch at the beginning of ready queue and at the end of Ready queue are not counted).
तीन CPU intensive processes P1, P2, P3 को क्रमशः 20, 10 और 30 units CPU time चाहिए और वे क्रमशः 1, 3 और 7 पर arrive करते हैं। यदि OS shortest remaining time first (preemptive scheduling) algorithm उपयोग कर रहा है, तो कितने context switches होंगे? (Ready queue की शुरुआत और अंत के context switch count न करें)
(UGC NET C.S. August-2016 (Paper-II))
A. 3
B. 2
C. 4
D. 5

Correct Answer: A

Explanation (EN): According to SRTF timeline, total counted context switches are 3.

Explanation (HI): SRTF timeline के अनुसार counted context switches की संख्या 3 है।

114. _____ is used to shift processes so they are contiguous, and all free memory is in one block.
Processes को contiguous करने और free memory को एक block में लाने के लिए किसका उपयोग किया जाता है?
(BPSC TRE 1.0 2023 (11-12))
A. Fragmentation
B. Compaction
C. External Fragmentation
D. More than one of the above

Correct Answer: B

Explanation (EN): Compaction moves processes so that free memory becomes one contiguous block.

Explanation (HI): Compaction processes को shift करके free memory को एक contiguous block में बदलता है।

115. The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
Virtual memory environment में किसी running process को minimum कितने page frames मिलने चाहिए, यह किससे determine होता है?
(UGC NET C.S. Exam-24 June-2019 (Paper-II))
A. Page size
B. Physical size of memory
C. The instruction set architecture
D. Number of processes in memory

Correct Answer: C

Explanation (EN): The minimum number of frames depends on the instruction set architecture, i.e., how many pages one instruction may touch.

Explanation (HI): Minimum frame requirement instruction set architecture पर depend करती है, यानी एक instruction कितने pages access कर सकती है।

116. In _____ page replacement algorithm, page that will not be used for longest period of time is replaced whenever a page fault occurs.
किस page replacement algorithm में वह page replace किया जाता है जो भविष्य में सबसे लंबे समय तक उपयोग नहीं होगा?
(HTET PGT C.S. 2022)
A. LRU
B. Optimal
C. FIFO
D. LFU

Correct Answer: B

Explanation (EN): The Optimal algorithm replaces the page that will not be used for the longest future time.

Explanation (HI): Optimal algorithm उस page को replace करता है जो भविष्य में सबसे लंबे समय तक उपयोग नहीं होगा।

117. In a round robin scheduling, context switch time is 4 units and the average process running time before blocking is 6 units, then CPU efficiency is:
Round Robin scheduling में context switch time 4 units है और blocking से पहले average process running time 6 units है। CPU efficiency क्या होगी?
(CGPSC C.S. 2020 Set-A)
A. 0.2
B. 0.4
C. 0.6
D. 0.1

Correct Answer: C

Explanation (EN): CPU efficiency = useful time / (useful time + overhead) = 6 / (6 + 4) = 0.6.

Explanation (HI): CPU efficiency = useful time / (useful time + overhead) = 6 / (6 + 4) = 0.6.

118. Consider a set of n tasks with known run times r1, r2, ... rn to be run on a uni-processor. Which scheduling algorithm will result in the maximum throughput?
n tasks के set में जिनके run times ज्ञात हैं और जिन्हें uni-processor पर चलाना है, कौन-सा scheduling algorithm maximum throughput देगा?
(CGPSC C.S. 2020 Set-A)
A. Round robin
B. SJF
C. Highest response ratio next
D. First-come-first served

Correct Answer: B

Explanation (EN): SJF maximizes throughput by completing shorter jobs first.

Explanation (HI): SJF छोटे jobs को पहले पूरा करके throughput maximize करता है।

119. Consider a logical address space of four pages of 2048 words each mapped into a physical memory of 32 frames. How many bits are there in the logical address?
चार pages वाले logical address space में, जहाँ प्रत्येक page 2048 words का है और mapping 32 physical frames पर है, logical address में कितने bits होंगे?
(CGPSC C.S. 2020 Set-A)
A. 12
B. 14
C. 13
D. 11

Correct Answer: C

Explanation (EN): Page number bits = 2 and offset bits = 11, so logical address bits = 13.

Explanation (HI): Page number bits = 2 और offset bits = 11, इसलिए logical address = 13 bits.

120. In which one of the following page replacement policies, Belady's anomaly may occur?
निम्न में से किस page replacement policy में Belady's anomaly हो सकती है?
(CGPSC C.S. 2020 Set-A)
A. FIFO
B. OPT
C. LRU
D. MRU

Correct Answer: A

Explanation (EN): Belady's anomaly can occur in FIFO page replacement.

Explanation (HI): Belady's anomaly FIFO page replacement में हो सकती है।