Question:
Which of the following statements is true?
निम्न में से कौन-सा कथन सत्य है?
Options:
- A program is generally composed of several different localities, which may overlap.
- A program is generally composed of several different localities, which must overlap.
- A program is generally composed of several different localities, which do not overlap.
- A program is generally composed of several different localities, which must not overlap.
- एक प्रोोग्रााम आम तौर पर कई अलग-अलग इलाकों से बना होता है, जो ओवरलैप हो सकता है।
- एक प्रोोग्रााम आम तौर पर कई अलग-अलग इलाकों से बना होता है, जिन्हें ओवरलैप करना चाहिए।
- एक प्रोोग्रााम आम तौर पर कई अलग-अलग इलाकों से बना होता है, जो ओवरलैप नहींं होता है।
- एक प्रोोग्रााम आम तौर पर कई अलग-अलग इलाकों से बना होता है, जिसे ओवरलैप नहींं करना चाहिए।
Correct Answer: a)
Explanation:
Detailed Explanation:
The correct answer is a) A program is generally made up of several different localities, which may overlap. (एक प्रोग्राम आमतौर पर कई अलग-अलग इलाकों से बना होता है, जो ओवरलैप हो सकता है।).
Locality Model of Program Behavior:
- In operating system memory management, Peter Denning’s Locality Model states that as a program executes, it moves through a sequence of localized memory reference phases known as localities.
- A locality is a defined set of pages/variables that are actively accessed together during a computational phase (such as a function call, a nested loop, or data matrix operations).
- A program consists of multiple distinct localities over time, and these localities may overlap. For instance:
- When a function calls a nested subroutine, the locality of the caller and the locality of the callee intersect.
- When distinct subroutines access shared global variables or static arrays, their localities overlap.
विस्तृत व्याख्या:
सही उत्तर a) एक प्रोग्राम आमतौर पर कई अलग-अलग इलाकों से बना होता है, जो ओवरलैप हो सकता है। है।
प्रोग्राम व्यवहार का लोकैलिटी मॉडल:
- ऑपरेटिंग सिस्टम में पीटर डेनिंग के लोकैलिटी मॉडल के अनुसार, किसी भी प्रोग्राम का निष्पादन विभिन्न मेमोरी रेफरेंस चरणों यानी ‘इलाकों’ (Localities) से होकर गुजरता है।
- एक ‘इलाका’ (Locality) उन पेजों का समूह होता है जो किसी दिए गए समय पर एक साथ सक्रिय रूप से उपयोग किए जाते हैं (जैसे किसी लूप या फंक्शन के निर्देश और डेटा)।
- एक प्रोग्राम के जीवनकाल में कई अलग-अलग इलाके होते हैं, और ये इलाके आपस में ओवरलैप (overlap) हो सकते हैं। उदाहरण के लिए, जब कोई मुख्य फंक्शन किसी सबरूटीन को कॉल करता है या दो अलग-अलग फंक्शन किसी साझा ग्लोबल डेटा को एक्सेस करते हैं।