Back to problems

Optimize a dispatcher’s scheduling data structures

Object-Oriented Programming · Airtable · Hard

You are reviewing a single-threaded, in-memory placement manager that responds to two groups of API calls. Downstream table/storage operations CreateTable(tableId, memoryRequired) ResizeTable(tableId, newMemoryRequired) Upstream mini-orchestrator operations CreateWorkload(machineId, tableId) — assign a table/workload to a machine MoveWorkload(tableId, fromMachineId, toMachineId) The placement manager must maintain the following state: a collection of machines, each with a…

Checking your access…