Question

1.
2.
3.
4.
Answer (Detailed Solution Below)

Option 1 : The code section, global data and open files, while each keeps its own stack and registers / कोड सेक्शन, ग्लोबल डेटा और खुली फ़ाइलें, जबकि प्रत्येक का अपना स्टैक और रजिस्टर होते हैं

Advertisement

Detailed Solution

सही उत्तर The code section, global data and open files, while each keeps its own stack and registers / कोड सेक्शन, ग्लोबल डेटा और खुली फ़ाइलें, जबकि प्रत्येक का अपना स्टैक और रजिस्टर होते हैं है।

Key Points
Helpful?
PrepSnapprepsnap.in • Part -A

Question:

Two threads run inside the same process on a multicore machine. Which resources do these threads necessarily share with each other? / एक ही प्रोसेस के अंदर दो थ्रेड मल्टीकोर मशीन पर चलते हैं। ये थ्रेड आपस में कौन से संसाधन अवश्य साझा करते हैं?

1.
The code section, global data and open files, while each keeps its own stack and registers / कोड सेक्शन, ग्लोबल डेटा और खुली फ़ाइलें, जबकि प्रत्येक का अपना स्टैक और रजिस्टर होते हैं
2.
Nothing at all, since threads are fully isolated like processes / कुछ भी नहीं, क्योंकि थ्रेड प्रोसेसों की तरह पूर्णतः पृथक होते हैं
3.
Separate address spaces but a common scheduling queue / पृथक एड्रेस स्पेस पर साझा शेड्यूलिंग कतार
4.
Only the thread identifier, with everything else duplicated per thread / केवल थ्रेड पहचानकर्ता, बाकी सब हर थ्रेड के लिए दोहराया जाता है

Correct Answer: The code section, global data and open files, while each keeps its own stack and registers / कोड सेक्शन, ग्लोबल डेटा और खुली फ़ाइलें, जबकि प्रत्येक का अपना स्टैक और रजिस्टर होते हैं

Threads of one process live in the same address space, sharing code, data and open files for cheap communication, but each thread needs its own stack, program counter and registers. / एक प्रोसेस के थ्रेड एक ही एड्रेस स्पेस में रहते हैं — सस्ते संचार के लिए कोड, डेटा और खुली फ़ाइलें साझा करते हैं — पर हर थ्रेड को अपना स्टैक, प्रोग्राम काउंटर और रजिस्टर चाहिए।

Downloaded from PrepSnap (prepsnap.in)