Hello,
I have been trying to turn this pesudo code into java code but i have been unsuccessfull. I need help doing this and any help would be appriciated
1.Initialise memory_block(0) = 99999
2.Computer initial_memory_waste = memory_block(0) – job_size
3.Inialise subscript = 0
4.Set counter to 1
5.Do while counter <= number of blocks in memory
If job_size > memory_size(counter)
counter = counter + 1
Else
memory_waste = memory_size(counter) – job_size
If initial_memory_waste > memory_waste
subscript = counter
Initial_memory_waste = memory_wast
counter = counter + 1
End do
6.If subscript = 0
put job in waiting list
Else
load job into memory(subscript)
adjust free/busy memory lists
7.Fetch next job
Thank you