Operating System

31. A processor while executing the instruction sequence of user mode process, received n interrupts. If no other activity is reported to processor during the execution of instruction sequence, what is the number of mode switches and process switches experienced?
एक processor user mode process की instruction sequence execute करते समय n interrupts प्राप्त करता है। यदि execution के दौरान processor को कोई अन्य activity report नहीं होती, तो mode switches और process switches की संख्या क्या होगी?
(CGPSC C.S. 2020 Set-A)
A. 2n, 2n
B. n, n
C. 2n, 0
D. n, 0

Correct Answer: C

Explanation (EN): Each interrupt causes two mode switches: user to kernel and kernel back to user. Since the same process continues execution, there are no process switches. Hence the answer is 2n mode switches and 0 process switches.

Explanation (HI): प्रत्येक interrupt पर दो mode switches होते हैं: user से kernel और फिर kernel से user। क्योंकि वही process execution जारी रखती है, इसलिए process switch नहीं होता। अतः उत्तर 2n mode switches और 0 process switches है।

32. In the case of parallelization, Amdahl's law states that if P is the proportion of a program that can be made parallel and (1–P) is the proportion that cannot be parallelized, then the maximum speed-up that can be achieved by using N processors is:
Parallelization के संदर्भ में Amdahl's law के अनुसार यदि P program का वह भाग है जिसे parallel बनाया जा सकता है और (1–P) वह भाग है जिसे parallel नहीं बनाया जा सकता, तो N processors का उपयोग करके अधिकतम speed-up क्या होगा?
(UGC NET C.S. June-2015 (Paper-II))
A. 1 / ((1 - P) + N.P)
B. 1 / (N(1 - P) + P)
C. 1 / ((1 - P) + P/N)
D. 1 / ((1 - P) + P.N)

Correct Answer: C

Explanation (EN): According to Amdahl's law, maximum speed-up is 1 / ((1 - P) + P/N).

Explanation (HI): Amdahl's law के अनुसार अधिकतम speed-up 1 / ((1 - P) + P/N) होता है।

33. Peterson's solution is a classic software-based solution to the critical-section problem. What is the maximum number of processes to which it is restricted?
Peterson's solution critical-section problem का एक classic software-based solution है। यह अधिकतम कितने processes के लिए restricted है?
(Haryana PGT C.S. Asstt. Prof. 2024)
A. 2
B. 3
C. 4
D. 5

Correct Answer: A

Explanation (EN): Peterson's solution is restricted to two processes. It uses two shared variables: flag[] and turn.

Explanation (HI): Peterson's solution केवल दो processes के लिए लागू होता है। इसमें दो shared variables उपयोग होते हैं: flag[] और turn।

34. Which of the following scheduling algorithms gives minimum average waiting time?
निम्न में से कौन-सा scheduling algorithm minimum average waiting time देता है?
(UKPSC PGT C.S. Asstt. Prof. 2017)
A. FCFS
B. SJF
C. Round Robin
D. Priority

Correct Answer: B

Explanation (EN): Shortest Job First (SJF) selects the process with the smallest CPU burst time next, which gives the minimum average waiting time.

Explanation (HI): Shortest Job First (SJF) वह process पहले चुनता है जिसकी CPU burst time सबसे कम होती है, इसलिए यह minimum average waiting time देता है।

35. File manipulation operations in an operating system include:
Operating system में file manipulation operations में क्या शामिल होता है?
(Bihar STET C.S. 12.09.2023 (Shift-I))
A. Allocating memory to files
B. Assigning file names to processes
C. Loading files into CPU registers
D. Reading, writing, and modifying file content

Correct Answer: D

Explanation (EN): File manipulation operations include opening, closing, reading, writing, updating contents, and deleting files. These operations allow a user or program to interact with files.

Explanation (HI): File manipulation operations में file को open करना, close करना, read करना, write करना, update करना और delete करना शामिल होता है। इनकी मदद से user या program files के साथ काम कर सकता है।

36. A large computer information system maintains many different computer files. Which amongst them is called a perpetual file?
एक बड़े computer information system में अनेक प्रकार की files होती हैं। इनमें से किसे perpetual file कहा जाता है?
(Bihar STET C.S. 12.09.2023 (Shift-II))
A. Specialized File
B. Master File
C. Log File
D. Update File

Correct Answer: B

Explanation (EN): A perpetual file is a file that is preserved for a long time and continually updated. Such a file is called a Master File.

Explanation (HI): Perpetual file वह file होती है जिसे लंबे समय तक सुरक्षित रखा जाता है और लगातार update किया जाता है। ऐसी file को Master File कहा जाता है।

37. What is coalescing ?
Coalescing क्या है?
(KVS PGT C.S. 2013)
A. It is second strategy for allocating kernel memory.
B. The buddy system allocates memory from a fixed size segment consisting of physically contiguous pages.
C. Kernel memory is often allocated from a free-memory pool different from the list used to satisfy ordinary user made processes.
D. An advantage of the buddy system is how quickly adjacent buddies can be combined to form larger segments using this technique.

Correct Answer: D

Explanation (EN): In the buddy system, adjacent free blocks called buddies can be merged quickly to form larger memory segments. This merging process is called coalescing.

Explanation (HI): Buddy system में पास-पास के free memory blocks, जिन्हें buddies कहते हैं, को मिलाकर बड़े segments बनाए जा सकते हैं। इसी merging process को coalescing कहते हैं।

38. Physical memory is broken into fixed size blocks called?
Physical memory को fixed size blocks में बाँटा जाता है, जिन्हें क्या कहा जाता है?
(RPSC C.S. 2016 (PAPER-I))
A. Frames
B. Pages
C. Chunks
D. Buffers

Correct Answer: A

Explanation (EN): In operating systems, physical memory is divided into fixed-size blocks called frames, while logical memory is divided into pages.

Explanation (HI): Operating system में physical memory को fixed-size blocks में विभाजित किया जाता है जिन्हें frames कहा जाता है, जबकि logical memory को pages में बाँटा जाता है।

39. What is the full form of ISAM in file organisation?
File organisation में ISAM का पूर्ण रूप क्या है?
(DSSSB TGT C.S. 01.08.2021 (Shift-I))
A. Indirect Sequential Access Method
B. Indexed Sequential Access Method
C. Indirect Serial Access Method
D. Index Serial Access Method

Correct Answer: B

Explanation (EN): ISAM stands for Indexed Sequential Access Method. It combines the benefits of sequential access and indexed access.

Explanation (HI): ISAM का पूर्ण रूप Indexed Sequential Access Method है। यह sequential access और indexed access दोनों के लाभों को जोड़ता है।

40. A disk consists of _____, ______, ______
एक disk में _____, ______, ______ होते हैं।
(DSSSB TGT C.S. 07.08.2021 (Shift-II))
A. track, segment and circle
B. track, circle and cone
C. drum, track and segment
D. cylinder, tracks and sectors

Correct Answer: D

Explanation (EN): A disk is organized into tracks and sectors, and corresponding tracks across platters form cylinders.

Explanation (HI): Disk को tracks और sectors में बाँटा जाता है, और विभिन्न platters पर एक ही radial position वाले tracks मिलकर cylinders बनाते हैं।