0

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

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by black_berry
0

Isn't this the exact same question you had in this thread in the Java forum, where I gave you a very detailed explanation of what you needed to do? You never even replied back. Shame. Guess I wasn't very helpful.

0

No sorry wasnt meant to be rude, i sent you a message thanking you dont know if you got it, your explanation really helped me out a lot. But this is a different problem i was reading in a book and i am just trying to turn it into java code

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.