Select Page

Harrisburg Area Community College Memory Management Bitmaps Program Project

Question Description

I use repl.it compiler, but this will eventually be run in a linux terminal, should not change anything. There should be two images under example but in case they are not visible I have attached them.

Memory Management-Bitmaps

All operating systems need to manage the physical memory to determine what parts of the memory are available and what parts are allocated to processes. When A process requests a memory location of a certain size, it is up to the memory manager to search its internal table and determine if there is enough memory in the system to fulfill this request, if so return the beginning address of the free memory block that the process will use.

There are two traditional ways memory manager uses to keep track of memory allocations: Linked Lists, and Bitmaps.

  • A bitmap is a table that will contain the words that represent physical memory.
  • A Word is a group of bits that represent a continuous region with physical memory.
  • A Mask which is a value that you will use to set or clear a certain bit(s) within a word, The mask will be either XORed or ANDed with a Word to accomplish this task.

Lab Details:

In this lab, a bit map implementation is requested to manage the memory of size 128KB with the unit (block) size being 2KB. You will need to use Bitwise operators with masking techniques to be able to accomplish this task.

Implementation Details:

  1. A Global Bitmap named Mem
    The bitmap will store the bits to represent A physical memory of Size 128KB.
  2. Mallocate function:
    which will take the size of the request space, searches the bitmap and return the address of the free block or -1 if no free space is available. Assume all memory sizes will be rounded to fit the 2KB boundary.
    Function declaration: int Mallocate(int Mem_Size);
  1. Free function:
    This function will take an address and a size from the user and reset the bits associated with this address in the corresponding Word in the bitmap.
    Function declaration: Void Free(int Address, int Size);

Notice: ** No External Libraries are allowed **

Example:

Slide1.JPG

Slide2.JPG

Submission:

  • One .C file named: Bitmap.c

"Place your order now for a similar assignment and have exceptional work written by our team of experts, guaranteeing you "A" results."

Order Solution Now