The buddy memory allocation technique is a memory allocation algorithm that divides memory into partitions to try to satisfy a memory request as suitably as possible. This system makes use of splitting memory into halves to try to give a best fit.
In this Project, I Used Threads For Random Requesting Allocation And DeAllocation Of Blocks In Memory For a Random Number Of Requests. For Example, Every 3seconds(Which Is Random Whenever One Block Is Requested) Processes, Will Request The Allocating Block Of Size 32kb, etc. When Their Request Count Is Over, They Will Free All Blocks(Addresses Of Memory) They Haven't DeAllocated.
Algorithm and data structures used in this project:
- Binary Search Tree
- Which used for finding the free blocks by dividing the larger blocks.
- First Fit
- Which used for finding addresses for allocating in each block of tree.
For reporting the each process I used three technique(Operate Every 5 Seconds):
- UI Thread Which Shows:
- The current state of tree (Which Block Is Occupied And Which Process Has This Block)
- The current state of memory (Total Free Spaces And Internal And External Fragment)
- The current state of processes (Total Spaced Which Is Used By This Process)
- Reporter Thread Which Shows(In Json Format):
- Start Time Of Process
- End Time Of Process
- Execution Time Of Process
- Address Which Used By This Process
- Total Allocated Space of Each Process
- Process Is Finished Or Not
- Logger Thread Which Using The Reporter Thread Json Data And Writes It In File Based On Time(./log folder).
cd project-folder
mvn clean javafx:run
OR
(for making jar file)
mvn clean install