Description
Objective: Write a C++ -program that will implement 4 Memory Management algorithms
Algorithms:
A) Best-Fit
B) First-Fit
C) Next-Fit
D) Worst-Fit
Your program must do the following:
-
Program Input:
User will input to the program
-
-
Main Memory information, including
-
The Number of Memory partitions.
-
The Size of each memory partition.
-
-
Process information (assign a unique identifier to each job)
-
User will input the number of processes
-
Memory requirements for each process/job
-
amount of memory each process requires
-
-
-
For each algorithm, your program should have a data structure(class or struct) that will include the following,
-
Name of the process/ job(number or word)
-
Process/job status (Run/Wait),
-
partition number the process/job was assigned to
You can create an array or list of the object to represent the job queue.
3. Program output:
a) Initial memory allocation: Calculate and display a list of initial memory allocation, i.e which partitions contain which process after the first round of allocation
b) Memory waste: Program will calculate and display the memory waste for each partition
c. total waste for each algorithm.
e. A list of Processes in the waiting State(was not assigned to a partition).
Deliver to black board:
Note: use the values from the example I provide to test your code
1)Source code from the program/programs
2)Screen shots of the output/results from each algorithm.
Possible Points:25