Question: Formulation of the FIFO algorithm for N - level memory hierarchy: Set memory levels to N ( ML = N ) . Set current memory

Formulation of the FIFO algorithm for N-level memory hierarchy:
Set memory levels to N (ML = N).
Set current memory level pointer to the highest (L =1).
1. Insertion of a new page:
1.1. If the current memory level pointer is higher than the lowest memory level
(L > ML) :
1.1.1. Return False. /* Recursion Termination */
1.2. Call to the page.
1.3. If the page exists in the memory / storage:
1.3.1. Check if placing in the L-level of memory is possible.
18
1.3.2. If placement possible:
1.3.2.1. Place the page at the L-level of memory.
1.3.2.2. Return True. /* Recursion Termination */
1.3.3. Else If placement impossible:
1.3.3.1. I f the reference bit of at least one of the pages is set to 0
(R =0):
1.3.3.1.1. Remove a page with reference bit set to 0.
1.3.3.1.2. Place the page instead of the removed page.
1.3.3.1.3. Do Insertion of the page with reference bit set to
0 to a lower level (L = L+1)./* Recursion Invocation */
1.3.3.2. Else If the reference bit of all of the pages is set to 1(R =
1):
1.3.3.2.1. Do Insertion of the page to a lower level (L =
L+1)./* Recursion Invocation */
1.4. Else If page does not exist in the memory / storage:
1.4.1. Return False. /* Recursion Termination */
2. Call to a page:
2.1. Calculate the addressing of the page in the memory / storage.
2.2. If page found:
2.2.1. Return Real Addressing.
2.3. Else If page was not found:
2.3.1. Return False.
19
3. Remove of a specifc page:
3.1. Store the page in a temporary storage.
3.2. Free the addressing of the page.
3.3. Return the page from the temporary storage.
4. Update of an existing page (by the OS):
4.1. If Read / Write action performed on the page:
4.1.1. Set R bit to 1(R =1).
4.2. If the page reached to the head of the FIFO queue and the page reference
bit is on (R =1):
4.2.1. Turn of the reference bit (R =0) and moves the page to the tail of
the FIFO queue.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!