Find Jobs
Hire Freelancers

MIPS Code for Memory Allocation/Deallocation

$10-30 USD

Closed
Posted about 4 years ago

$10-30 USD

Paid on delivery
In this project, you are required to develop a software subsystem for dynamic allocation of memory and implement it in MIPS assembly language. The main program of your code keeps on waiting in a loop for user’s request through console for allocation/deallocation of memory of a size for a variable with a name, and calls allocation or deallocation procedure accordingly. The allocation procedure allocates an available chunk of memory (that is, one not allocated to another variable), and updates an availability list that indicates which portions of memory are allocated and which are free. The new variable is also put in an available row of a table called symbol table along with the information about range of chunks allocated to the variable. When a deallocation request comes from the user, the deallocation procedure is invoked. This procedure updates the availability list by marking the chunks allocated to the variable as free (free for allocation to another variable in a forthcoming allocation request). The symbol table entry corresponding to this variable is also deleted. The allocation and deallocation requests may come in any order, and a possible complication your project needs to handle is the scenario where there may not be enough contiguous memory required for the new variable though the free memory from disjoint chunks may total up to a value higher than the requested amount. For easier design and testing, you may make the following simplifying assumptions: The pool of memory is very limited, say 2048 bytes The pool is partitioned into small chunks of equal size (say, 32 bytes each so that in a pool of 2048 bytes, there will be 64 chunks). Though the memory requests could come for any size, allocation is always done in the integral number of chunks. That is, if a request for 100 bytes is made, 128 bytes (or 4 chunks) are allocated. Ideas for Design: You need to have a symbol table or a mapping of memory variables and the range of the numbers of chunks allocated. You also need to have a free/availability list, a Boolean array indicated the free and allocated chunks (1 for allocated and 0 for free chunks). Initially, all entries in free list are marked zero (i.e. free). All symbol table entries are also initialized to be available possibly by setting an availability flag to zero.
Project ID: 25149375

About the project

Remote project
Active 4 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs

About the client

Flag of UNITED STATES
Fort Worth, United States
0.0
0
Member since Apr 25, 2020

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.