MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPUTER ARCHITECTURE

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In replacement algorithm ____ method is to replace the block in the set that has been in the cache longest.
A
FIFO (First-in-first-out)
B
LRU (Least-recently-used)
C
LFU (Least-frequently-use)
D
FILO (First-in-last-out)
Explanation: 

Detailed explanation-1: -FIFO algorithm replaces the oldest (First) page which has been present for the longest time in the main memory. In simple words, When a new page comes in from secondary memory to main memory, It selects the front of the queue which is the oldest page present, and removes it.

Detailed explanation-2: -Cache replacement algorithms are used to optimize the time taken by processor to process the information by storing the information needed by processor at that time and possibly in future so that if processor needs that information, it can be provided immediately.

Detailed explanation-3: -First In First Out (FIFO) When there is a need for page replacement, the FIFO algorithm, swaps out the page at the front of the queue, that is the page which has been in the memory for the longest time.

Detailed explanation-4: -FIFO is acronym of First-In, First-Out. After all the blocks are occupied, in case a new block must be inserted, this policy takes the first block inserted and replaces for the new one. In a case of hit, the cache memory does not change the state (Figure 2.2).

There is 1 question to complete.