Memory Management Project Documentation
Memory Management Project Documentation
Segmentation:
When a process is going to execute, we check the segmentation table to get the segments
needed for the execution.
Inputs:
the data of the process name and segments number.
the segments name and size.
Allocation algorithm first or best algorithm.
Deallocate a process.
Deallocation address (for deallocate form system).
Output:
Draw the memory space (holes ,allocated for processes , allocated for the system).
Segmentation Table.
Design GUI
This gui designed to be simple and easy to use as we would see guide that in the guide.
Figure 23:Gui Design
User Guide
1. Enter the size of the memory then a block of memory with this size would be draw in the
Graphics view on the Right.
2. Enter the start and size for a hole then Click add hole ,A hole at the start would add by the size.
3. Entre the start of An allocated block you want to deallocate from the system and Click Dalloc
Button ,the block would be free.
4. add the process name and the segments number then it would be appear in the Process Data
compo box to enter it’s data.
5. then chose the process you want and insert the segments name and their size.
6. if you entered all the process segments then you are able to choose the allocation algorithm and
click allocate and the memory space would be updated if the process are successfully allocated
else error message would appear.
7. To deallocate a process chose it from the compo box and click deallocate the it would be
deallocated and the block memory would be updated.
Flow Chart
Figure 26:process can’t allocate as one or more segment does not have a suitable space
And there is more of the Warning messages ,that I made for make testing phase much easier.
Algorithms Logic Design
I implement both first and best algorithms on code blocks first, then merge them with the qt gui.
And the implementation gave the user many options like using Both first and best Algorithm in the same
Example ,but with different processes.
Example
Classes Description
class block represent the block Which is one of three(hole ,allocated for a
process ,allocated for the System) ,we use this also to Draw in the Gui.
Class MySquer I just made it to inherit from the library ,that I use to draw
square in the Graphics View.
Class process the represent the process with it name ,segments ,and the
include the segmentation table.
Class GUI used for interfacing ,take data ,and make actions(messages ,draw
memory space ,draw segmentation table).