Lab. Assignment 2 Solution

$30.00 $24.00

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…

5/5 – (2 votes)

You’ll get a: zip file solution

 

Description

5/5 – (2 votes)

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:

  1. Program Input:

User will input to the program

    1. Main Memory information, including

      1. The Number of Memory partitions.

      2. The Size of each memory partition.

    2. Process information (assign a unique identifier to each job)

      1. User will input the number of processes

      2. Memory requirements for each process/job

      3. amount of memory each process requires

  1. 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

Lab. Assignment 2 Solution
$30.00 $24.00