Basic CS-Operating System [3i Infotech Placement]: Sample Questions 76 - 77 of 89

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 76

Write in Short Short Answer▾

Where are the auto variable stored? What are register variabes?

Edit

Explanation

  • Auto variable are stored in memory and their default value is a garbage value. Compare them with register variables below.

Register Variables

  • Register variables are meant to be stored in processor registers.
  • It may or get the place in a register depending upon whether there are sufficient registers available. Microprocessors have 14 to 16 registers and might already be occupied.
  • Registers are 16 bit so these statements should be avoided: register float i , register double j. The compiler wont show any error and will take them as auto.

Question 77

Write in Short Short Answer▾

Explain Belady՚s Anomaly.

Edit

Explanation

Belady՚s Anomaly in Figure
  • Belady՚s Anomaly is also called a FIFO anomaly.
  • Increasing number of frame allocated to a process virtual memory should make execution faster, because few page faults occur.
  • However, reverse happens i.e.. the execution time increases as more frames are allocated.
  • Caused by certain page reference patterns.
  • Last replacement use page (LRU) algorithm is free from Belady՚s anomaly.