Struct definition as the page table entry

Assignment Help C/C++ Programming
Reference no: EM13504529

Use the following struct definition as the page table entry and the array that follows it as the page table. Implement the software simulation of least recently used algorithm in two C++ functions. Should RUN on UNIX.

The first one will implement the aging and will be called at every clock interrupt. The second one will return the index in the page table of the entry to be replaced using this algorithm.

//Testing file will be provided.

//Should be well commented.....

----------------------------------

typedef struct

{
word pageFrameLocation; /*called page frame number

byte recentlyUsedBits; /* this is the field you will use for aging*/

byte flags; /* see format of flags below*/

}

PageTableEntry;

PageTableEntry page_table[1024]; /* this is the global variable for the page table*/

/* the page table entries flags field has the following format, the high order bit (You can find if it is set by doing a bitwise and with the flags member and 0b10000000) is the referenced bit. The next highest order bit is the Modified bit. The next three bits are the protection bits (in order rwx [read/write/execute]) The next bit is the present/absent bit, the next bit is the caching disabled bit *

Reference no: EM13504529

Questions Cloud

Define system whose equalibrium constant is relatively small : Which of the following is true for a system whose equalibrium constant is relatively small? a.) it will take a short time to reach equalibrium.
Several quotes of freud that communicate anti-american : Bettelheim presents several quotes of Freud that communicate an "anti-American" attitude he held. Select two examples where Freud is expressing such an opinion. for each example, discuss how Freud's anti-American sentiment ties into his theory.
Explain the system is at equalibrium : a.) because Qc= 1, the system is at equalibrium. b.) Because Qc=1, more products will be formed. c.) Because Qc=1, more reactants will be formed. d.)Because Qc Kc,more reactants will be formed
Ecological system theory : Ecological system theory writing a paper and could use a few ideas! This is relation to social work.
Struct definition as the page table entry : Struct definition as the page table entry and the array that follows it as the page table. Implement the software simulation of least recently used algorithm in two C++ functions. Should RUN on UNIX.
Explain pressure changes at constant tempature : Which of the following equilibria would NOT be affected by pressure changes atconstant tempature. a.) CO(g) + 1/2O2(g) CO2(g) b.)CaCO3(s) CaO(s) + CO2(g)
Is psychotherapy more beneficial than psychiatric medication : Is psychotherapy more beneficial than psychiatric medication? Do college students consume more beer than other age groups? Do students remember information longer after preparing for essay exams than for multiple-choice exams?
Estimate the magnetic flux through the coil : The inductance of a closely packed coil of 350 turns is 9.5 mH. Calculate the magnetic flux (per winding) through the coil when the current is 5.0 mA
An explanation of how client culture : An explanation of how client culture may influence client perceptions of substance use. how could you use the information to determine if a client meets the criteria for a substance related disorder?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  Create a program that will round a floating point

Create a program that will round a floating point value to a specified number of decimal places as input by the user. To perform the actual calculation, write a function that takes the user's value and the number of decimal places as input paramet..

  Write pseudocode for a program

Write pseudocode for a program that prompts the user for a month and day and prints out whether it is one of the following four holidays.

  rewrite that statement in a more readable style.

Give an example statement in C, C++, or Java that is particularly unreadable. Rewrite that statement in a more readable style.

  What output would be produced by the program segment

What output would be produced by the following program segment?

  Implement the tronomino tiling algorithm

Implement the tronomino tiling algorithm,  our program should take an arbitrary input positive integer  k  in the Linux command line and generate a 2 k  * 2 k  board.

  Mark the following statements as true or false

Mark the following statements as true or false.

  Displays columns titled "name", "quantity", "price", value

Write a program that displays columns titled "Name", "Quantity", "Price", and "Value". The fourth column contains the result of multiplying each item's quantity by its price. In addition, the program should calculate and display the total value of th..

  Write a c programto find simple interest using function

Write a C programto find simple interest using function ? Please provide running program in C with output screenshoot.

  While loop that allows the user to continue entering

This code should include a while loop that allows the user to continue entering employees as long as they want to continue:int main(){Real payrate,hours, gross,again;

  Write a webservices application that does a simple four

write a webservices application that does a simple four function calculator. write a cgi program launched by your

  Write a function sum3darray

Write a function sum3DArray. This function will take a three dimensional array of ints and add all the entries in the three dimensional array. Assume columns and rank are two constants already defined.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd