Write a program to simulate a dynamic memory subsystem. The program should have function(s) which accept(s) input in the form of pid, allocate, size in bytes,

computer science

Description

Write a program to simulate a dynamic memory subsystem. The program should have function(s) which accept(s) input in the form of pid, allocate, size in bytes, pid, free, address, and pid, resize, address, new size. *** If the requests are valid and adequate space is available, 1) and 3) should return the address of the space granted; otherwise, they should return 0. *** request of the form 2) should return 0 for valid requests and -1 for invalid ones. Create a test trace for at least 5 processes (5 unique pids). Clearly comment your code


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.