Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1: Memory Management You are requested to write a Java program of a simple Memory Management Unit. The program should allow the following: 1.

image text in transcribed
Problem 1: Memory Management You are requested to write a Java program of a simple Memory Management Unit. The program should allow the following: 1. The user can create a process asking for memory. The program will return a process ID if the requested memory can be allocated. It will also print the allocated Base and Limit. 2. The user can delete a process by specifying a process ID. The program should do that and free any allocated memory for the deleted process. 3. The user can, using a process ID, ask to convert between virtual addresses and physical addresses. 4. The user can ask the program to print the memory map showing what memory is allocated and to which process. Your program should be named mmu. When you start your program it prompts the user for the amount of memory to be managed in KB. Your program should display a prompt for the user and should accept the following 4 commands: 1. cr AMOUNT OF REQUESTED MEMORY Description: Create a process and allocate the requested amount of memory (in KB) to it. The command should return the process ID and the Base and Limit of the allocated memory. The command may return an error message if there is not enough memory e.g. 1500 2. dl PROCESS ID Description: Delete the specified process and free the allocated memory. The command should return an error message if there is no process with the specified ID. e.g. dl 6 3. cv PROCESS ID VIRTUAL ADDRESs Description: Make a conversion for the specified process ID from the specified Virtual Addres to the Physical Address. The command should return an error message if the process tries to access an address outside its address space. e.g. cv 6 200 4. pm Description: Print the memory map. The command should print which memory locations are assigned e.g. pm

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

7th edition

978-1111825911, 1111825912, 978-1133684374, 1133684378, 978-111182591

More Books

Students also viewed these Databases questions

Question

How was their resistance overcome?

Answered: 1 week ago

Question

3. What strategies might you use?

Answered: 1 week ago