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

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 09 · From Scratch · Distributed Scheduler · with code: Go · about 24 min to read

Play it as a journeyTutor comes with a plan

Scheduler 01: The Tick Loop

The Tick Loop
The Tick Loop · Open board

A person glancing at a clock and a list of jobs: anything due now? Do it, then note when it’s next due. It sits inside the project lesson Build Your Own Distributed Scheduler, From Scratch, which lays out the seven stages this build climbs.

Before you start. This series builds a small scheduler, a program whose only job is running other programs at the right moment instead of a person watching a clock. Build Your Own Distributed Scheduler, From Scratch lays out the seven stages ahead. This first one is the smallest version of that idea: one loop, on one machine, with every job’s plan held in memory (the computer’s fast working space, wiped when the program stops) rather than saved to disk.

Lesson 62 of 117 in From Scratch

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.

See plansAlready a member? Sign in

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

In this lesson

  • 20 July 1969: a number on the screen neither astronaut had memorized
  • The one idea, in four words
  • Break one: sleeping never gives you the time back
  • Break two: the choice the guidance computer had already made
  • Break three: the cost of asking everyone
  • The loop, wearing armour

Terms it explains: 1202, job, priority, drift, deadline, skip, Queue, Allow, scan, at least, grows without bound, skip, ranked by priority.

Review From Scratch