Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

Launch price

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.

See plansStart free instead

Module 09 · System Design · The low-level design round

Design an elevator (a state machine with a scheduler)

Design an Elevator
Design an Elevator · Open board

The four states, one pile of stops, first come first served against SCAN, and three cars answering one call.

Before you start. You need two ideas from earlier in this track. Tell everyone who cares (Observer and State) drew a state machine: a thing that is always in exactly one of a few named states, where only certain events move it from one to another. A state is the values an object holds right now. Design a parking lot (the first whole round) ran a whole design round: an interview round is one hour with one interviewer, and a design round asks you to write the classes inside one program, where a class is a blueprint for objects. This lesson runs a second round, and the new difficulty is that the thing you are designing keeps moving while people keep pressing buttons.

Lesson 42 of 73 in System Design

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year, or $19.50 for your first year with LAUNCH50, ends 1 Nov, 18:30 UTC.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1854: a man cuts his own rope
  • The car is always in one of four situations: a state
  • Buttons pile up in a request queue
  • Who goes next? A scheduler, first come first served
  • Keep going: SCAN, the scheduler that does not turn round early
  • The follow-up: three cars and one call

Terms it explains: state, event, request queue, scheduler, SCAN, state machine.

Review System Design