Computer AwarenessVery hardIBPS SO IT Officer

A process has 3 page frames, all empty at first, and refers to pages 7, 0, 1, 2, 0, 3, 0, 4, 2, 3. How many page faults occur under the Optimal (OPT) algorithm?

  1. A. 7
  2. B. 6
  3. C. 8
  4. D. 9

Correct answer: B. 6

OPT evicts the page used farthest in future: faults on 7, 0, 1, 2 (evict 7), 3 (evict 1) and 4 (evict 0); the rest hit, so 6 faults. LRU gives 8 and FIFO 9 on this string.

हिंदी में

एक प्रक्रिया के पास 3 पेज फ़्रेम हैं, जो शुरू में सब खाली हैं, और वह पेजों 7, 0, 1, 2, 0, 3, 0, 4, 2, 3 का संदर्भ देती है। ऑप्टिमल (OPT) एल्गोरिदम में कितने पेज फ़ॉल्ट होंगे?

  1. A. 7
  2. B. 6
  3. C. 8
  4. D. 9

उत्तर: B. OPT उस पेज को हटाता है जो भविष्य में सबसे दूर प्रयोग होगा: फ़ॉल्ट 7, 0, 1, 2 (7 हटाएँ), 3 (1 हटाएँ) और 4 (0 हटाएँ) पर होते हैं; शेष हिट हैं, इसलिए 6 फ़ॉल्ट। इस स्ट्रिंग पर LRU 8 और FIFO 9 देता है।

More Computer Awareness questions

Exams that ask this topic