Hacker News

Elevators

twitter-card

Everyone has shared the frustration of waiting for an elevator that never seems to arrive. “I pressed the button, why isn’t it coming?” you ask. For something as commonplace as elevators, they are far more complex than meets the eye.Over the course of this article, we’ll unravel the mysteries of elevators. The way you push their buttons, and how they push yours.43211x5x25xOne CarThe simplest elevator algorithm is called SCAN and was patented in 1961. The elevator starts at the lobby and goes all the way to the top floor before reversing and coming back down. It picks up and drops off anybody on the way.Most of the time you don’t actually need to go to the TOP floor. If the elevator goes only as high as requested before reversing, the algorithm is called the LOOK algorithm. This is the…

Continue reading at Hacker News john.fun
Advertisement