All MicroEvals
You are designing the state machine for a distributed job sc...
Create MicroEval
Header image for You are designing the state machine for a distributed job sc...

You are designing the state machine for a distributed job sc...

Prompt

You are designing the state machine for a distributed job scheduler with these constraints: 1. Jobs have priorities 1-10 and deadlines. Preemption: a higher-priority job may preempt a running lower-priority one, BUT a preempted job must resume within 30s of its original deadline or be failed with code E422. 2. Exactly-once semantics: a worker crash between 'job started' DB write and 'result committed' write must not lose or duplicate the job. Design the recovery protocol including what the worker, the DB, and the scheduler each do on timeout. 3. There is exactly one 5-second window per hour (during log rotation) where the scheduler lock is held by a maintenance thread. Preemption requests arriving in that window must be queued, not dropped, and MUST NOT starve: if 100+ arrive during one window, define the fairness policy. 4. A byzantine worker reports 'success' for jobs it never ran. The scheduler cannot add new RPC endpoints and cannot use a central trust authority. Detect this with at least 90% precision using only existing job artifacts (logs, timing, resource metrics). Deliverables: (a) full state machine with transition table, (b) the exact recovery algorithm with pseudo-code handling the crash window, (c) the fairness policy for the maintenance window with proof no request is dropped or indefinitely starved, (d) the byzantine detection heuristic with its false-positive analysis. State explicitly any constraint you find mutually unsatisfiable and prove it.

Drag to resize
Drag to resize
Drag to resize
Drag to resize