Need Help ?

Home / Expert Answers / Other / exercise-4-5-8-modified-elevator-solution-i-about-the-elevator-algorithm-uses-a-complex-condition-to

(Answered): Exercise 4.5.8: Modified elevator solution. i About The Elevator algorithm uses a complex condition ...



Exercise 4.5.8: Modified elevator solution. i About The Elevator algorithm uses a complex condition to decide whether a reque

busy 30 upsweep monitor elevator condition upsweep, downsweep; busy = 0 move_to(destination) { if (busy) if ((position destin

Exercise 4.5.8: Modified elevator solution. i About The Elevator algorithm uses a complex condition to decide whether a request should be placed into the upsweep or the downsweep queue: == dest) if ((position < dest) || ((position && (direction = up))) == (a) How will the behavior of the algorithm change if the compound condition is replaced by the simple condition: if (position < dest) (b) How will the behavior of the algorithm change if the compound condition is replaced by the simple condition: if (position <= dest) busy 30 upsweep monitor elevator condition upsweep, downsweep; busy = 0 move_to(destination) { if (busy) if ((position destination) || (position==destination) && (direction=-up)) upsweep.wait(destination) else downsweep.wait(-destination) busy = 1 position = destination 25 20 15 downsweep 10 release() { busy = 0 if (direction=-up) if (!empty(upsweep)) upsweep.signal else direction = down downsweep.signal else if (!empty(downsweep)) downsweep.signal else direction = up upsweep.signal 5


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer to Exercise 4.5.8: Modified elevator solution. i About The Elevator algorithm uses a complex condition to decide whether a ...
We have an Answer from Expert

Buy This Answer $4

Place Order