SSC IMD SA 2017 – Question 142

Question:

The solution to starvation is:

स्टारवेशन का समाधान है:

Options:

  • Number of rollbacks must be included in the cost factor
  • Number of resources must be included in resource acquisition
  • Resources should be supplied instead
  • All options are correct
  • रोलबैक की संख्या को लागत कारक में शामिल किया जाना चाहिए
  • संसाधनों की संख्या संसाधन प्रााप्ति में शामिल होनी चाहिए
  • इसके बजाय संसाधनों की पूर्ति होनी चाहिए
  • सभी विकल्प सही हैं

Correct Answer: a)

Explanation:

Detailed Explanation:

The correct answer is a) Number of rollbacks should be included in the cost factor (रोलबैक की संख्या को लागत कारक में शामिल किया जाना चाहिए).

The Problem of Starvation:

  • In deadlock recovery via resource preemption or process termination, victim selection is guided by a minimum-cost policy.
  • If cost is evaluated strictly on static parameters (such as CPU time consumed or process priority), the same low-cost process may be chosen as the victim repeatedly. Consequently, this process will be aborted/rolled back again and again, leading to starvation (indefinite postponement).

The Standard Solution:

  • To guarantee that starvation does not occur, the number of rollbacks must be included in the cost factor.
  • Each time a process is rolled back, its effective cost factor increases. Eventually, its cost becomes high enough that another process will be chosen as the victim instead, ensuring that every process eventually completes.

विस्तृत व्याख्या:

सही उत्तर a) रोलबैक की संख्या को लागत कारक में शामिल किया जाना चाहिए (Number of rollbacks should be included in the cost factor) है।

स्टारवेशन (Starvation) की समस्या:

  • डेडलॉक से उबरने के दौरान, जब न्यूनतम लागत (minimum cost) के आधार पर विक्टिम प्रोसेस का चयन किया जाता है, तो संभव है कि बार-बार एक ही कम लागत वाली प्रोसेस को चुना जाए और उसे बार-बार रोलबैक (वापस पुरानी स्थिति में) कर दिया जाए।
  • इसके परिणामस्वरूप वह प्रोसेस कभी समाप्त नहीं हो पाती, जिसे स्टारवेशन (भूखमरी) कहा जाता है।

समाधान:

  • स्टारवेशन को रोकने के लिए रोलबैक की संख्या को लागत कारक (Cost Factor) में जोड़ा जाना चाहिए।
  • जितनी अधिक बार किसी प्रोसेस को रोलबैक किया जाता है, उसकी प्राथमिकता/लागत उतनी ही बढ़ जाती है, जिससे भविष्य में डेडलॉक होने पर सिस्टम उस प्रोसेस के बजाय किसी अन्य प्रोसेस को विक्टिम चुनता है।

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top