Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Overview The Memory Management module in an operating system needs to perform several calculations to serve and assist the CPU. All processes - system or

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Overview The Memory Management module in an operating system needs to perform several calculations to serve and assist the CPU. All processes - system or application ones need to be loaded on to system memory to be executed. One of the tasks of memory management involves maintaining lists of used memory areas and another list of available/unused free memory slots. In this project, we will try to write a high-level language program that will perform calculations for a very small group of the memory manager functions related to maintenance of such tables. The idea behind this project is to enable a better understanding of used and unused area and their addresses for the students. Learning Objectives The focus of this assignment is on the following learning objectives: Be able to understand how the memory manager uses base register and limit register values corresponding to the memory slots to keep a track of memory location limits Be able to demarcate the memory map into used and unused parts Be able to generate the memory map snapshot for current memory usage Prerequisites To complete this project, you need to make sure that you have the following: C/C++ compiler (you can use the free GNU C/C++ SSH server or the VM you are provided with) A C/C++ IDE or text editor (multiple editors exist for developers) An understanding of the material presented in class and the numerical examples worked in the class An understanding of the material covered in the textbook. Problem Description You are to implement a program that would solve questions like the one below: A computer system has a total memory of 16000 locations. Given several base register and limit register values corresponding to unused memory slots, Base register = 1000, Limit register = 100 Base register = 2000, Limit register = 200 Base register = 5000, Limit register = 750 Perform calculations to ascertain the range of memory addresses that are currently available/free Use the above calculations to ascertain the range of memory addresses that are currently under use Calculate and report the various divisions of the memory map The list of requirements are as follows: General requirements for the program: 1. The program asks the user to enter some number of base register and corresponding limit register values and accepts these values. You should not assume a fixed number of pairs of base-limit values. These values should be variable and decided by the user. 2. The program confirms the user inputs by printing the table of Base and Limit Register values. 3. Based on the user inputs as above, the program computes the memory areas used and the memory address ranges for used memory areas. You can assume that the slots are somewhere in between, and no slot is at the very beginning of the memory map (obviously, this area will be used by the operating system processes) or at the very end of the map. 4. Your program should display a neat memory map clearly showing used and unused memory areas with the first and last addresses of the used and unused areas. 5. You can assume that the system has a memory of 16000 locations. 6. You can also assume that the user will enter the base and limit values for absolute physical address values within the valid range of number of locations (between 0 and 15999). 7. You can also assume that the user will enter these values in increasing order of base register values for the free slots, starting with the values corresponding to the first free slot from the start of the memory map. 8. The program should clear any dynamically allocated memory used and not leave any memory leaks before exiting. 9. The program should be tested on the UWF SSH server (or on the VM - only if the SSH server is down) before submission and submitted with a makefile. The instructor will test the program files by only running make and make clean. Please make sure that the makefile also contains the name of the target executable file and the command to run the target. Entering the 'make' command on the command prompt should run the target executable file. Grading Breakdown 17 pts] Accepting variable number of base-limit pair values for unused memory slots from the user. 18 pts] Reading in the base-limit pair values for unused memory slots from the user and displaying them as a table. [20 pts] Generating a memory map with correct values for the used and unused areas 15 pts) Reporting the memory map in a neatly formatted output, on the lines of the sample output further below. These points would be contingent to getting the map values correct. 15 pts Submitting a memory leak-free program (5 pts] Submitting a makefile for the program that works as specified in point 9 above . Submission Points will be deducted for not following these instructions. Before submitting this project in Canvas, please make sure that you follow the following steps: 1. Make sure you test the working of your project on the UWF SSH server. 2. Make sure that your name appears at the top of each file. This should be done as a comment for any source code files. 3. If your project spans source code multiple files (.h & .cpp or .c), add all files into a .zip file with the file name "lastname_firstname_project01.zip". 4. Turn your zipped up project into eLearning/Canvas. SAMPLE RUN (Values in teal indicate user input) - Your inputs and output could be slightly different from mine for the first five output lines. The tabular output should be as neat and properly justified as shown below. It could have more columns if more frames are specified, but of those columns should be well justified and equally neat. Please enter the number of free/empty slots are there at the moment: 3 Next enter the base and limit values for free slots Entry #1 for base followed by limit: 1000 100 Entry #2 for base followed by limit: 2000 200 Entry #3 for base followed by limit: 5000 750 The table of ununsed memory areas Base Register Limit Register 1000 100 2009 200 5000 750 The Complete Memory Map table is: Used: 999 Unused: 1000 1100 Used: 1101 1999 Unused: 2009 2200 Used: 2201 4999 Unused: 5000 5750 Used: 5751 15999 Please enter the number of free/empty slots are there at the moment: 6 Next enter the base and limit values for free slots Entry #1 for base followed by limit: 900 75 Entry #2 for base followed by limit: 2100 250 Entry #3 for base followed by limit: 3900 400 Entry #4 for base followed by limit: 7000 650 Entry #5 for base followed by limit: 10000 450 Entry #6 for base followed by limit: 12750 600 The table of ununsed memory areas Base Register Limit Register 900 75 2100 250 39ee 4ee 7eee 650 1eeee 450 12750 600 The Complete Memory Map table is: Used: 899 Unused: 900 975 Used: 976 2099 Unused: 2100 2350 Used: 2351 3899 Unused: 3900 4300 Used: 4301 6999 Unused: 7000 7650 Used: 7651 9999 Unused: 10eee 1845e Used: 10451 12749 Unused: 12750 13350 Used: 13351 15999 Overview The Memory Management module in an operating system needs to perform several calculations to serve and assist the CPU. All processes - system or application ones need to be loaded on to system memory to be executed. One of the tasks of memory management involves maintaining lists of used memory areas and another list of available/unused free memory slots. In this project, we will try to write a high-level language program that will perform calculations for a very small group of the memory manager functions related to maintenance of such tables. The idea behind this project is to enable a better understanding of used and unused area and their addresses for the students. Learning Objectives The focus of this assignment is on the following learning objectives: Be able to understand how the memory manager uses base register and limit register values corresponding to the memory slots to keep a track of memory location limits Be able to demarcate the memory map into used and unused parts Be able to generate the memory map snapshot for current memory usage Prerequisites To complete this project, you need to make sure that you have the following: C/C++ compiler (you can use the free GNU C/C++ SSH server or the VM you are provided with) A C/C++ IDE or text editor (multiple editors exist for developers) An understanding of the material presented in class and the numerical examples worked in the class An understanding of the material covered in the textbook. Problem Description You are to implement a program that would solve questions like the one below: A computer system has a total memory of 16000 locations. Given several base register and limit register values corresponding to unused memory slots, Base register = 1000, Limit register = 100 Base register = 2000, Limit register = 200 Base register = 5000, Limit register = 750 Perform calculations to ascertain the range of memory addresses that are currently available/free Use the above calculations to ascertain the range of memory addresses that are currently under use Calculate and report the various divisions of the memory map The list of requirements are as follows: General requirements for the program: 1. The program asks the user to enter some number of base register and corresponding limit register values and accepts these values. You should not assume a fixed number of pairs of base-limit values. These values should be variable and decided by the user. 2. The program confirms the user inputs by printing the table of Base and Limit Register values. 3. Based on the user inputs as above, the program computes the memory areas used and the memory address ranges for used memory areas. You can assume that the slots are somewhere in between, and no slot is at the very beginning of the memory map (obviously, this area will be used by the operating system processes) or at the very end of the map. 4. Your program should display a neat memory map clearly showing used and unused memory areas with the first and last addresses of the used and unused areas. 5. You can assume that the system has a memory of 16000 locations. 6. You can also assume that the user will enter the base and limit values for absolute physical address values within the valid range of number of locations (between 0 and 15999). 7. You can also assume that the user will enter these values in increasing order of base register values for the free slots, starting with the values corresponding to the first free slot from the start of the memory map. 8. The program should clear any dynamically allocated memory used and not leave any memory leaks before exiting. 9. The program should be tested on the UWF SSH server (or on the VM - only if the SSH server is down) before submission and submitted with a makefile. The instructor will test the program files by only running make and make clean. Please make sure that the makefile also contains the name of the target executable file and the command to run the target. Entering the 'make' command on the command prompt should run the target executable file. Grading Breakdown 17 pts] Accepting variable number of base-limit pair values for unused memory slots from the user. 18 pts] Reading in the base-limit pair values for unused memory slots from the user and displaying them as a table. [20 pts] Generating a memory map with correct values for the used and unused areas 15 pts) Reporting the memory map in a neatly formatted output, on the lines of the sample output further below. These points would be contingent to getting the map values correct. 15 pts Submitting a memory leak-free program (5 pts] Submitting a makefile for the program that works as specified in point 9 above . Submission Points will be deducted for not following these instructions. Before submitting this project in Canvas, please make sure that you follow the following steps: 1. Make sure you test the working of your project on the UWF SSH server. 2. Make sure that your name appears at the top of each file. This should be done as a comment for any source code files. 3. If your project spans source code multiple files (.h & .cpp or .c), add all files into a .zip file with the file name "lastname_firstname_project01.zip". 4. Turn your zipped up project into eLearning/Canvas. SAMPLE RUN (Values in teal indicate user input) - Your inputs and output could be slightly different from mine for the first five output lines. The tabular output should be as neat and properly justified as shown below. It could have more columns if more frames are specified, but of those columns should be well justified and equally neat. Please enter the number of free/empty slots are there at the moment: 3 Next enter the base and limit values for free slots Entry #1 for base followed by limit: 1000 100 Entry #2 for base followed by limit: 2000 200 Entry #3 for base followed by limit: 5000 750 The table of ununsed memory areas Base Register Limit Register 1000 100 2009 200 5000 750 The Complete Memory Map table is: Used: 999 Unused: 1000 1100 Used: 1101 1999 Unused: 2009 2200 Used: 2201 4999 Unused: 5000 5750 Used: 5751 15999 Please enter the number of free/empty slots are there at the moment: 6 Next enter the base and limit values for free slots Entry #1 for base followed by limit: 900 75 Entry #2 for base followed by limit: 2100 250 Entry #3 for base followed by limit: 3900 400 Entry #4 for base followed by limit: 7000 650 Entry #5 for base followed by limit: 10000 450 Entry #6 for base followed by limit: 12750 600 The table of ununsed memory areas Base Register Limit Register 900 75 2100 250 39ee 4ee 7eee 650 1eeee 450 12750 600 The Complete Memory Map table is: Used: 899 Unused: 900 975 Used: 976 2099 Unused: 2100 2350 Used: 2351 3899 Unused: 3900 4300 Used: 4301 6999 Unused: 7000 7650 Used: 7651 9999 Unused: 10eee 1845e Used: 10451 12749 Unused: 12750 13350 Used: 13351 15999

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_2

Step: 3

blur-text-image_3

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

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

Explain the factors influencing wage and salary administration.

Answered: 1 week ago

Question

Examine various types of executive compensation plans.

Answered: 1 week ago

Question

1. What is the meaning and definition of banks ?

Answered: 1 week ago

Question

2. What is the meaning and definition of Banking?

Answered: 1 week ago