Description
Run this code in Jeliot. Send me 3 screenshots of it being run/how you ran it. That’s all.
Unformatted Attachment Preview
Using Jeliot, execute the following algorithm which implements a buffer pool algorithm. The algorithm
offers options for three different heuristics including LRU, LFU, and FIFO.
import Prog1Tools.IOTools;
import java.util.*;
class replacepage
{
public static void main(String args[]) {
boolean flag;
int f, page=0, ch, pgf=0, n, chn=0, k, pt;
int pages[];
//pgf-page fault
System.out.println(“Menu 1.FIFO 2. LRU 3. LFU”);
System.out.println(“ENTER YOUR CHOICE: “);
Scanner in = new Scanner(System.in);
ch = in.nextInt();
switch(ch)
{
case 1:
pt=0;
System.out.println(“enter no. of buffers (available buffers in the pool): “);
f=in.nextInt();
int buffer[]=new int[f];
for(int i=0;i
Purchase answer to see full
attachment