Question: CAIS 339 Homework #7 In this homework, you will implement a Java class called Paging that simulates certain aspects of a memory management system based

 CAIS 339 Homework #7 In this homework, you will implement a
Java class called Paging that simulates certain aspects of a memory management
system based on paging. The memory management system simulated by the class

CAIS 339 Homework #7 In this homework, you will implement a Java class called Paging that simulates certain aspects of a memory management system based on paging. The memory management system simulated by the class Paging has a physical memory with 16 physical frames, all of which are initially unoccupied. The size of each physical frame (and hence, the size of each logical page) is 4096 bytes. The class Paging should implement the following three public methods, and any other helper methods you deem necessary to implement the three methods. public void allocate(int processID, int numberOfPages) This method should simulate allocation of free physical frames for a process (whose ID is processID) that needs numberOfPages logical pages. After updating proper data structures for the simulation, this method should display the new physical memory status showing which frame is allocated to which process. public void free int processID) This method should simulate deallocation of all of the physical frames allocated for a process (processID). Deallocated physical frames become available for subsequent allocation requests. After updating proper data structures, this method should display the new physical memory status showing which frame is allocated to which process public int resolve int processID, int logicalAddress) This method should translate a logical address (logicalAddress) for a process (processID) into a corresponding physical address. (In order to perform this function, you will need to maintain page tables for all processes that are in the memory.) Before returning the physical address, this method should display the resolved physical address, and display the physical memory status showing which frame is allocated to which process In order for you to test the three methods you implement, I have created a class called Console (attached with an accompanying class MemoryRequest), which interacts with the user to get requests, and calls the three methods in the class Paging. The provided Paging.java is merely a skeleton code that just has the three methods unimplemented I suggest that you copy all of the Java files to your own directory, and just modify Paging.java

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!