Question: Given the following reference string and assuming that there is no content in the memory, write the page frame number and corresponding information corresponding to

Given the following reference string and assuming that there is no content in the memory, write the page frame number and corresponding information corresponding to the number during
the process of replacing the page for each of the LFU and CLOCK page replacement algorithms. However, assume that there are 4 frames in the memory. The CLOCK page replacement algorithm assumes a
one-handed clock, and when writing your answer, you must include the one-handed pointer (*) and the arrow pointing to the page frame to be allocated. [6 points]
Reference string venfication code
char student_id[]="20150213"
#include stdio.h>
#include stdlib.h
int main(int argc, char* argv[]){
char *student_id ="20150213";
int a,b,i;
int page_stream[9];
a = atoi(student_id)%3;
b = atoi(student_id)%4;
page_stream [0]= student_id[3]-'0';
page_stream[1]= student_id[5]-'0';
page_stream[2]= a;
page_stream[3]= student_id[7]-'0';
page_stream[4]= student_id[1]-'0';
page_stream [5]= b;
page_stream[6]= student_id[0]-'0';
page_stream[7]= student_id[1]-'0'+3;
page_stream [8]= student_id[6]-'0';
printf("page stream:");
for(i=0;i9;i++){
printf(%%d ",page_stream[i]);
}
printf("Wn");
}
(1) LFU
(2) CLOCK
Given the following reference string and assuming

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 Programming Questions!