Self - editing C ++ Implementation and Source of LRU Algorithm in Classical Operation System Textbook.

zhaozj2021-02-16  54

#include #include

/ * void setm (int A [】 [], int m, int N) {INT I, J; for (i = 0; i

} int mini (int * b) {INT i = 0; INT N, M, FLAG; N = 0; While (B [i]> = 0 && B [i] <= 9) {n ; i ;} m = B [0]; FLAG = 0; for (j = 1; j b [j]) {m = b [j]; flag = j;}} returnif;}

Void main () {int N; CHAR SEQUENCE [255]; cout << "Please enter the number of tops:"; cin >> n; cout << "Please enter the access sequence:"; cin >> sequence; cout << "***** All right reserved by hero *****" << Endl;

Martrix = new int * [n]; for (i = 0; i

Current = new char [n]; for (i = 0; i